2024-02-13 21:45:51

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/3] gpio: take the SRCU read lock in gpiod_hog()

On Tue, Feb 13, 2024 at 10:31 AM Bartosz Golaszewski <[email protected]> wrote:

> From: Bartosz Golaszewski <[email protected]>
>
> gpiod_hog() may be called without the gpio_device SRCU read lock taken
> so we need to do it here as well. It's alright if someone else is
> already holding the lock as SRCU read critical sections can be nested.
>
> Fixes: d83cee3d2bb1 ("gpio: protect the pointer to gpio_chip in gpio_device with SRCU")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-lkp/[email protected]
> Signed-off-by: Bartosz Golaszewski <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Looking at the CLASS() stuff I see this is definitely the way to go
with the code now that we face massive scaling. Nice work.

Yours,
Linus Walleij