diff options
author | Aleksa Savic <savicaleksa83@gmail.com> | 2024-05-04 11:25:03 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-05-04 06:36:41 -0700 |
commit | d02abd57e79469a026213f7f5827a98d909f236a (patch) | |
tree | e31c063e32acc4688f3d6a0351c6cae011c0ce3c /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 3a034a7b0715eb51124a5263890b1ed39978ed3a (diff) |
hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock
Through hidraw, userspace can cause a status report to be sent
from the device. The parsing in ccp_raw_event() may happen in
parallel to a send_usb_cmd() call (which resets the completion
for tracking the report) if it's running on a different CPU where
bottom half interrupts are not disabled.
Add a spinlock around the complete_all() in ccp_raw_event() and
reinit_completion() in send_usb_cmd() to prevent race issues.
Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver")
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Acked-by: Marius Zachmann <mail@mariuszachmann.de>
Link: https://lore.kernel.org/r/20240504092504.24158-4-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions