]> www.infradead.org Git - users/dwmw2/linux.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)
committerSasha Levin <sashal@kernel.org>
Sun, 25 Aug 2019 14:10:35 +0000 (10:10 -0400)
commit178398e1d821ba2cbeb0ffa636ceeb68c88d4f28
tree57e54cdc57667822ac00ca785f3315894c939075
parent24223b9c00f274adf453adfb57b4e04615492cb8
usb: setup authorized_default attributes using usb_bus_notify

commit 27709ae4e2fe6cf7da2ae45e718e190c5433342b upstream.

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