Re: [PATCH] gpiolib: don't report -ENOMEM for a requested line without a label
From: Bartosz Golaszewski
Date: Fri Oct 23 2026 - 03:54:20 EST
On Thu, 22 Oct 2026 11:33:44 +0300, Adrian Ambrozewicz wrote:
> gpiod_request_commit() sets GPIOD_FLAG_REQUESTED, calls ->request() and
> only then sets the label. A line in between has no label, so
> gpiochip_dup_line_label() passes NULL to kstrdup() and returns
> ERR_PTR(-ENOMEM), which for_each_hwgpio() then passes to kfree():
>
> BUG: unable to handle page fault for address: ffcc73074355ffc8
> Call Trace:
> gpio_sim_dbg_show
> gpiolib_seq_show
> seq_read_iter
>
> [...]
Applied, thanks!
[1/1] gpiolib: don't report -ENOMEM for a requested line without a label
https://git.kernel.org/brgl/c/dae739137441667d67fbfcc4d303a0ecc6618662
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>