]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
kobject: return error code if writing /sys/.../uevent fails
authorPeter Rajnoha <prajnoha@redhat.com>
Wed, 5 Dec 2018 11:27:44 +0000 (12:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Dec 2018 15:07:43 +0000 (16:07 +0100)
commitdf44b479654f62b478c18ee4d8bc4e9f897a9844
tree2c028dc441857a753c6341bacbb86b9a6e9a5e07
parentc37d721c68ad88925ba0e72f6e14acb829a8c6bb
kobject: return error code if writing /sys/.../uevent fails

Propagate error code back to userspace if writing the /sys/.../uevent
file fails. Before, the write operation always returned with success,
even if we failed to recognize the input string or if we failed to
generate the uevent itself.

With the error codes properly propagated back to userspace, we are
able to react in userspace accordingly by not assuming and awaiting
a uevent that is not delivered.

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/bus.c
drivers/base/core.c
kernel/module.c