summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2023-01-31 15:49:04 -0500
committerAlexander Grund <flamefire89@gmail.com>2024-01-02 17:36:33 +0100
commit0c212370ff815a4263bf80bba5dace7eea913bda (patch)
tree54f1500acc6f87956f296196776284102d8086f2 /tools/perf/scripts/python
parent08da74f8720c0e93c0fb17509596a2c47bf1a0d2 (diff)
USB: core: Don't hold device lock while reading the "descriptors" sysfs file
commit 45bf39f8df7f05efb83b302c65ae3b9bc92b7065 upstream. Ever since commit 83e83ecb79a8 ("usb: core: get config and string descriptors for unauthorized devices") was merged in 2013, there has been no mechanism for reallocating the rawdescriptors buffers in struct usb_device after the initial enumeration. Before that commit, the buffers would be deallocated when a device was deauthorized and reallocated when it was authorized and enumerated. This means that the locking in the read_descriptors() routine is not needed, since the buffers it reads will never be reallocated while the routine is running. This locking can interfere with user programs trying to read a hub's descriptors via sysfs while new child devices of the hub are being initialized, since the hub is locked during this procedure. Since the locking in read_descriptors() hasn't been needed for over nine years, we can remove it. Reported-and-tested-by: Troels Liebe Bentsen <troels@connectedcars.dk> Change-Id: Ib38603b37746e8e3e22e2b4fd3040278ee391feb Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/Y9l+wDTRbuZABzsE@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli+cip@fpond.eu> AG: Squash with "USB: core: remove device lock left behind by mismerge"
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions