Re: [PATCH] gpio: cdev: fix a NULL-pointer dereference with DEBUG enabled

From: Bartosz Golaszewski
Date: Fri Feb 16 2024 - 08:21:21 EST


On Fri, Feb 16, 2024 at 1:35 PM Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> wrote:
>
> On 16.02.2024 11:59, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> >
> > We are actually passing the gc pointer to chip_dbg() so we have to
> > srcu_dereference() it.
> >
> > Fixes: 8574b5b47610 ("gpio: cdev: use correct pointer accessors with SRCU")
> > Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> > Closes: https://lore.kernel.org/lkml/179caa10-5f86-4707-8bb0-fe1b316326d6@xxxxxxxxxxx/
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>

Thanks, patch applied.

Bart

[snip]