]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: usbhid: fix deadlock in hid_post_reset()
authorOliver Neukum <oneukum@suse.com>
Tue, 24 Mar 2026 14:24:54 +0000 (15:24 +0100)
committerJiri Kosina <jkosina@suse.com>
Thu, 9 Apr 2026 15:48:05 +0000 (17:48 +0200)
commit8df2c1b47ee3cd50fd454f75c7a7e2ae8a6adf72
treebf4be01a34175079b2650e2ac084de2de65cc3c4
parent1f95a6cd5ad78ed27a31a20cbd1facff6f10b33d
HID: usbhid: fix deadlock in hid_post_reset()

You can build a USB device that includes a HID component
and a storage or UAS component. The components can be reset
only together. That means that hid_pre_reset() and hid_post_reset()
are in the block IO error handling. Hence no memory allocation
used in them may do block IO because the IO can deadlock
on the mutex held while resetting a device and calling the
interface drivers.
Use GFP_NOIO for all allocations in them.

Fixes: dc3c78e434690 ("HID: usbhid: Check HID report descriptor contents after device reset")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/usbhid/hid-core.c