Re: [PATCH] hwmon: corsair-psu: fix and readd locking of command buffer
From: Guenter Roeck
Date: Wed May 13 2026 - 12:42:41 EST
On Wed, May 13, 2026 at 03:53:51PM +0000, Wilken Gottwalt wrote:
> On Wed, 13 May 2026 07:58:14 -0700
> Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
>
...
> Okay, that will get a bit complex now, because I added my hack and I see
> exactly what I assumed is happening.
>
...
>
> If this does not explain the obvious issue, I have not idea how explain
> it further. My English is limited. This is a HID driver with data gathering
> functions running in the context of the USB-HID context. Callbacks from the
> hwmon and the debugfs subsystem call these data gathering functions, and the
> first function in that context, corsairpsu_request(), which can run several
> instances in paralellel, needs the mutex.
>
You don't explain why the patches below are insufficient.
I used guard() to keep the changes simple, but hwmon_lock() / hwmon_unlock()
would be similar. Please provide evidence that this does not work.
Thanks,
Guenter
--