Re: [PATCH v2] gpiolib: fix invalid pointer access in debugfs
From: Andy Shevchenko
Date: Mon Nov 03 2025 - 09:38:01 EST
On Mon, Nov 03, 2025 at 03:11:32PM +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.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
--
With Best Regards,
Andy Shevchenko