Re: [PATCH v2 1/3] gpio: mpsse: use rcu to ensure worker is torn down

From: Linus Walleij
Date: Wed Oct 01 2025 - 03:15:36 EST


On Tue, Sep 23, 2025 at 3:35 PM Mary Strodl <mstrodl@xxxxxxxxxxx> wrote:

> When an IRQ worker is running, unplugging the device would cause a
> crash. The sealevel hardware this driver was written for was not
> hotpluggable, so I never realized it.
>
> This change uses RCU to create a list of workers, which it tears down on
> disconnect.
>
> Signed-off-by: Mary Strodl <mstrodl@xxxxxxxxxxx>

Oh this RCU thing is a bit terse and a lot of code.

Can you look if you can use the new revocable resource
management API? It uses RCU underneath.
https://lwn.net/Articles/1038523/

Yours,
Linus Walleij