summaryrefslogtreecommitdiff
path: root/drivers/spmi
diff options
context:
space:
mode:
authorAleksa Savic <savicaleksa83@gmail.com>2024-05-04 12:25:03 +0300
committerGuenter Roeck <linux@roeck-us.net>2024-05-04 16:36:41 +0300
commitd02abd57e79469a026213f7f5827a98d909f236a (patch)
treee31c063e32acc4688f3d6a0351c6cae011c0ce3c /drivers/spmi
parent3a034a7b0715eb51124a5263890b1ed39978ed3a (diff)
downloadlinux-d02abd57e79469a026213f7f5827a98d909f236a.tar.xz
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 'drivers/spmi')
0 files changed, 0 insertions, 0 deletions