]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: hid-sjoy: race between init and usage
authorOliver Neukum <oneukum@suse.com>
Tue, 3 Mar 2026 09:48:54 +0000 (10:48 +0100)
committerJiri Kosina <jkosina@suse.com>
Tue, 12 May 2026 15:23:08 +0000 (17:23 +0200)
commit17ee873dba04d05090dfc5b2b9e08cfc8e4f147f
treeb622e709c002200001d7265f7169665af1d09586
parent487359284509a6745e14b8c0518768bc277809b0
HID: hid-sjoy: race between init and usage

The driver uses an initial IO to set the device to a default
state. That initialization is currently being done after the device
node has been created. That means that the single buffer used
for output can be altered while IO is in progress.
Move the intialization before announcement to user space.

Fixes: fac733f029251 ("HID: force feedback support for SmartJoy PLUS PS2/USB adapter")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-sjoy.c