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

From: Mary Strodl
Date: Thu Oct 02 2025 - 10:34:21 EST


Hello!

On Thu, Oct 02, 2025 at 10:03:33PM +0800, Tzung-Bi Shih wrote:
> To use revocable API, we need to identify what resources should protect. It
> seems there are some UAF possibilities in gpio_mpsse_poll() after unplugging
> the device.
Yeah, that's what the cancel_work_sync is supposed to protect. This case is a
little weird because the task itself is what could get destroyed on unplug,
but it could be cool to have some guarantees around accessing `priv` and other
resources in the worker?

I'm open to suggestions if you have ideas. Thanks!