[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174075675438.58699.5156226276115874344.b4-ty@linaro.org>
Date: Fri, 28 Feb 2025 16:32:40 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2] gpiolib: Fix Oops in gpiod_direction_input_nonotify()
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
On Fri, 28 Feb 2025 16:03:47 +0300, Dan Carpenter wrote:
> The gpiod_direction_input_nonotify() function is supposed to return zero
> if the direction for the pin is input. But instead it accidentally
> returns GPIO_LINE_DIRECTION_IN (1) which will be cast into an ERR_PTR()
> in gpiochip_request_own_desc(). The callers dereference it and it leads
> to a crash.
>
> I changed gpiod_direction_output_raw_commit() just for consistency but
> returning GPIO_LINE_DIRECTION_OUT (0) is fine.
>
> [...]
Applied, thanks!
[1/1] gpiolib: Fix Oops in gpiod_direction_input_nonotify()
commit: 64407f4b5807dc9dec8135e1bfd45d2cb11b4ea0
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Powered by blists - more mailing lists