diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-11-03 15:11:32 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-13 15:34:37 -0500 |
| commit | 70180a6031056096c93ed2f47c41803268bdd91c (patch) | |
| tree | 9ed17e43deb871230aee439f2bf1a70a0cd16f4e /include/net/aligned_data.h | |
| parent | 5a0aca55e84d931ea0bda8e3ea4bc036784b7eeb (diff) | |
gpiolib: fix invalid pointer access in debugfs
[ Upstream commit 2f6115ad8864cf3f48598f26c74c7c8e5c391919 ]
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.
Fixes: e348544f7994 ("gpio: protect the list of GPIO devices with SRCU")
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20251103141132.53471-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
