Skip to content

hwmon: (corsair-cpro) Fix issues when hidraw is used

Aleksa Savic linux-hwmon lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hwmon: (corsair-cpro) Use a separate buffer for sending commandsdrivers/hwmon/corsair-cpro.c+12 -71 reply
2/3hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event()drivers/hwmon/corsair-cpro.c+1 -11 reply
3/3hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlockdrivers/hwmon/corsair-cpro.c+19 -51 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMarius Zachmann
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] hwmon: (corsair-cpro) Fix issues when hidraw is used

This patch series fixes the behavior of the corsair-cpro driver while hidraw is used from userspace.

The first patch introduces a separate buffer for sending commands to the device to prevent it from being overwritten thanks to a hidraw userspace call.

The second patch replaces the complete() call in the raw event parsing function with complete_all() to signify that the completion is done until reinit.

The third patch introduces locking for the ccp->wait_input_report completion as it's touched in functions that could be executing in parallel.

Aleksa Savic (3):
hwmon: (corsair-cpro) Use a separate buffer for sending commands
hwmon: (corsair-cpro) Use complete_all() instead of complete() in

    ccp_raw_event()

hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock

 drivers/hwmon/corsair-cpro.c | 45 +++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 13 deletions(-)
Signature · 1 line
2.44.0