]> git.hungrycats.org Git - linux/commit
HID: asus: refactor the two workqueues and init sequence
authorDenis Benato <denis.benato@linux.dev>
Fri, 19 Jun 2026 00:10:59 +0000 (00:10 +0000)
committerJiri Kosina <jkosina@suse.com>
Mon, 3 Aug 2026 17:24:52 +0000 (19:24 +0200)
commit47669bec44fe12fe2c7adf2b299e980d7935a2ce
treede81567d693873e54cf2376bcdc9af338ec21620
parent2c9a6998c19503626c57a2267bf279e204113079
HID: asus: refactor the two workqueues and init sequence

Multiple issues have been found within the hid-asus driver:
- unchecked size in asus_raw_event()
- unclean teardown of asus_probe on failure
- possible use-after-free in asus_probe
- multiple workqueue used for jobs where one was enough
- sleeping calls in atomic context
- packets of incorrect size being sent to the keyboard controller

Join the two workqueues into one reusing the stopping mechanism
of the brightness workqueue, use the joined workqueue to also
move the asus_wmi_send_event() sleeping call away from atomic
context and add a size check in asus_raw_event().

Fixes: f631011e36b8 ("HID: hid-asus: Implement fn lock for Asus ProArt P16")
Fixes: 1489a34e97ef ("HID: asus: Implement Fn+F5 fan control key handler")
Fixes: b34b5945a769 ("HID: asus: listen to the asus-wmi brightness device instead of creating one")
Reported-by: sahiko-bot@kernel.org
Closes: https://lore.kernel.org/all/20260613154732.60A4B1F000E9@smtp.kernel.org/
Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-asus.c