]> Git Repo - linux.git/commit
hwmon: (gigabyte_waterforce) Mark status report as received under a spinlock
authorAleksa Savic <[email protected]>
Tue, 19 Dec 2023 14:36:19 +0000 (15:36 +0100)
committerGuenter Roeck <[email protected]>
Mon, 8 Jan 2024 15:27:27 +0000 (07:27 -0800)
commit41c71105a845ec1458680f01644d032a5fbbe0d9
treea69c3f76e872575345f3f95b6187db4f3247bb5a
parent8249a0e25dd2972e919a2552425bf4faa2581d24
hwmon: (gigabyte_waterforce) Mark status report as received under a spinlock

Through hidraw, userspace can cause a status report to be sent
from the device. The parsing in waterforce_raw_event() may happen in
parallel to a waterforce_get_status() 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() call in waterforce_raw_event()
to prevent race issues.

Fixes: d5939a793693 ("hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers")
Signed-off-by: Aleksa Savic <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
drivers/hwmon/gigabyte_waterforce.c
This page took 0.06285 seconds and 4 git commands to generate.