summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-11-05 14:37:52 +0100
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-11-09 09:57:13 +0100
commitc62364eeac0f123478fca2f2d8e2424fdcd55032 (patch)
tree7847051ed0bca7fb4133a2396d8f1b42a734f7b4 /rust/kernel/alloc/kvec/errors.rs
parentcfbd01eddaf5bfdd4f53560013fe830571a186e9 (diff)
gpio: of: fix potential misconfiguration of hogged lines
In of_gpiochip_get_lflags() the local variable xlate_flags is declared without being initialized before its address is passed to of_xlate_and_get_gpiod_flags() when processing a devicetree gpio-hog child node. If a driver uses an of_xlate() callback that doesn't update the flags argument (like gpiochip_fwd_delay_of_xlate()) we'll end up passing that uninitialized value to of_convert_gpio_flags(), potentially misconfiguring the hogged GPIO. Initialize xlate_flags to 0. Cc: stable@vger.kernel.org Fixes: d1d564ec4992 ("gpio: move hogs into GPIO core") Closes: https://sashiko.dev/#/bug/linux-2bb44847-fd6e-406c-878d-9739da2cb8b5 Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Mika Westerberg <westeri@kernel.org> Link: https://patch.msgid.link/20261105-gpiolib-of-hog-uninitialized-v1-1-fcaeaccefab6@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions