]> git.baikalelectronics.ru Git - kernel.git/commit
usb: setup authorized_default attributes using usb_bus_notify
authorThiébaud Weksteen <tweek@google.com>
Tue, 6 Aug 2019 11:00:50 +0000 (13:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Aug 2019 14:07:34 +0000 (16:07 +0200)
commitc7bb5520e483664d33920df7a92a9f2a99430aeb
tree4573510c07b599692a0040a3dd39e36bffb90d52
parent4fcc164ade2b26ff3953f2bb17fb467da4d6c6c6
usb: setup authorized_default attributes using usb_bus_notify

Currently, the authorized_default and interface_authorized_default
attributes for HCD are set up after the uevent has been sent to userland.
This creates a race condition where userland may fail to access this
file when processing the event. Move the appending of these attributes
earlier relying on the usb_bus_notify dispatcher.

Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190806110050.38918-1-tweek@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c
drivers/usb/core/sysfs.c
drivers/usb/core/usb.h