Re: [PATCH v2] gpiolib: fix invalid pointer access in debugfs

From: Bartosz Golaszewski
Date: Mon Nov 03 2025 - 10:25:31 EST


From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>


On Mon, 03 Nov 2025 15:11:32 +0100, Bartosz Golaszewski wrote:
> If the memory allocation in gpiolib_seq_start() fails, the s->private
> field remains uninitialized and is later dereferenced without checking
> in gpiolib_seq_stop(). Initialize s->private to NULL before calling
> kzalloc() and check it before dereferencing it.
>
>

Applied, thanks!

[1/1] gpiolib: fix invalid pointer access in debugfs
https://git.kernel.org/brgl/linux/c/2f6115ad8864cf3f48598f26c74c7c8e5c391919

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>