public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] hwmon: (corsair-cpro) Fix issues when hidraw is used
@ 2024-05-04  9:25 Aleksa Savic
  2024-05-04  9:25 ` [PATCH 1/3] hwmon: (corsair-cpro) Use a separate buffer for sending commands Aleksa Savic
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Aleksa Savic @ 2024-05-04  9:25 UTC (permalink / raw)
  To: linux-hwmon
  Cc: Jonas Malaco, Aleksa Savic, Marius Zachmann, Jean Delvare,
	Guenter Roeck, linux-kernel

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(-)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-04 13:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-04  9:25 [PATCH 0/3] hwmon: (corsair-cpro) Fix issues when hidraw is used Aleksa Savic
2024-05-04  9:25 ` [PATCH 1/3] hwmon: (corsair-cpro) Use a separate buffer for sending commands Aleksa Savic
2024-05-04 12:14   ` Marius Zachmann
2024-05-04  9:25 ` [PATCH 2/3] hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event() Aleksa Savic
2024-05-04 12:14   ` Marius Zachmann
2024-05-04  9:25 ` [PATCH 3/3] hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock Aleksa Savic
2024-05-04 12:14   ` Marius Zachmann
2024-05-04 13:37 ` [PATCH 0/3] hwmon: (corsair-cpro) Fix issues when hidraw is used Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox