[lvc-project] [PATCH v6 0/2] Last remaining Roccat HID fixes
Dmitry Antipov
dmantipov at yandex.ru
Fri Oct 16 14:33:19 MSK 2026
Adjusted to and basically tested with for-7.4/roccat branch of
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git;
https://syzkaller.appspot.com/bug?extid=d632e93ffcd1452bc61e and
https://syzkaller.appspot.com/bug?extid=c492a9e154f81127551f looks
passed as well.
I'm still thinking that roccat_device_available() is worth trying.
Anyway, let's make Sashiko to do one more round. In particular,
device_destroy(device->dev->class, MKDEV(roccat_major, minor));
WRITE_ONCE(device->dev, NULL);
was wrong because it opens tiny race window when the destroying
device may be examined with device_is_registered() called from
roccat_device_available(). This is expected to be fixed with:
struct device *dev = xchg(&device->dev, NULL);
device_destroy(dev->class, MKDEV(roccat_major, minor));
Dmitry Antipov (2):
HID: roccat: use device_is_registered() to check whether device is available
HID: roccat: use kref to manage device instances
drivers/hid/hid-roccat.c | 49 +++++++++++++++++++++++++++-------------
1 file changed, 33 insertions(+), 16 deletions(-)
--
2.56.0
More information about the lvc-project
mailing list