]> git.ipfire.org Git - thirdparty/linux.git/commit
usb: core: sysfs: add lock to bos_descriptors_read()
authorGriffin Kroah-Hartman <griffin@kroah.com>
Wed, 15 Jul 2026 14:59:05 +0000 (16:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2026 15:11:44 +0000 (17:11 +0200)
commit4e0197fbb0eec588795d5431716a244d9ac8fa93
treeab4658f36f3b21fcb00a5362862fab11d660bf39
parentc947360ae63eee1c9eacc030dd6f5a53f717addf
usb: core: sysfs: add lock to bos_descriptors_read()

Add a lock to the function bos_descriptors_read().

This function accesses udev->bos, which could be simultaneously freed in
usb_reset_and_verify_device(), a function that is commonly called in
drivers all over the kernel.

Assisted-by: gkh_clanker_t1000
Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/20260715-usb_core_patches_3-v1-1-53021f5576fd@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/sysfs.c