Re: [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver

From: Stuart
Date: Mon Feb 10 2025 - 11:16:28 EST


> This effectively kills the system. We came here via:
> corsair_void_raw_event (hid_driver::raw_event)
> -> corsair_void_process_receiver
> -> scoped_guard(mutex, &drvdata->battery_mutex)

> And hid_driver::raw_event can be called from the interrupt context. This
> happened at:

Damn it, I was suspicious that it was too easy. It's been running for a year
without an issue on my system, I'll clearly have to read a bit more.

I'm not sure what the best solution is for this.
'corsair_void_process_receiver()' shouldn't be called frequently, and
the locks shouldn't be waiting on each other very often, so I suppose
swapping the mutex for a spinlock is probably the best option, instead of
increasing code complexity?

Happy to put a patch in for whatever seems best :)

Thanks,
Stuart