summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2026-10-22 08:44:53 +0300
committerBenjamin Tissoires <bentiss@kernel.org>2026-10-28 10:36:40 +0100
commitbe90794d15c6b22861cacebaca2380cbff855157 (patch)
treebc471a8e30928baf3d4b0343b67bcbf60295cd09 /tools/perf/scripts/python/stackcollapse.py
parent6569d814fa49384e3e0f4f41947ecfabf2eb93c8 (diff)
HID: roccat: use kref to manage device instances
Use kref to manage 'struct roccat_device' instances and fix both memory leaks and UaF-triggering races between roccat_open()/roccat_release() and roccat_connect()/roccat_disconnect() pairs. To avoid the scenario when opened device is disconnected and its slot indexed by minor number is reused by another device, release the slot in roccat_free_device() rather than in roccat_disconnect(). This way, there is a time frame when disconnected device may still occupy the slot; to reject such a device, add extra roccat_device_available() checks to roccat_open() and roccat_ioctl(). Add extra WARN_ON() device check to roccat_disconnect() and a few debugging quirks to roccat_free_device() as well. Reported-by: syzbot+d632e93ffcd1452bc61e@syzkaller.appspotmail.com Reported-by: syzbot+c492a9e154f81127551f@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d632e93ffcd1452bc61e Closes: https://syzkaller.appspot.com/bug?extid=c492a9e154f81127551f Link: https://sashiko.dev/#/patchset/20260902094551.200587-1-dmantipov@yandex.ru?part=2 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Link: https://patch.msgid.link/20261022054454.238343-3-dmantipov@yandex.ru Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions