Re: [PATCH 1/8] gpiolib: check the return value of gpio_chip::get_direction()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 10, 2025 at 11:51:55AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> 
> As per the API contract - gpio_chip::get_direction() may fail and return
> a negative error number. However, we treat it as if it always returned 0
> or 1. Check the return value of the callback and propagate the error
> number up the stack.

This is breaking boot for me on both the original Raspberry Pi and the
Pi 4.  The boot dies without any output on the original Pi, on the Pi 4
the boot seems to die when disabling clocks:

[   11.695534] amba fe201000.serial: deferred probe pending: amba: wait for supplier /soc/gpio@7e200000/uart0-gpio32
[   11.705920] platform leds: deferred probe pending: leds-gpio: Failed to get GPIO '/leds/led-act'
[   15.032277] clk: Disabling unused clocks

Full log:

   https://lava.sirena.org.uk/scheduler/job/1126311

I've enclosed a bisect log below, it converges fairly smoothly:

git bisect start
# status: waiting for both good and bad commits
# bad: [67961d4f4e34f5ed1aeebab08f42c2e706837ec5] Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git
git bisect bad 67961d4f4e34f5ed1aeebab08f42c2e706837ec5
# status: waiting for good commit(s), bad commit known
# good: [6537cfb395f352782918d8ee7b7f10ba2cc3cbf2] Merge tag 'sound-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
git bisect good 6537cfb395f352782918d8ee7b7f10ba2cc3cbf2
# good: [d59355014fa12fb0033edf64917ac0139cd6423a] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git
git bisect good d59355014fa12fb0033edf64917ac0139cd6423a
# good: [35c2c30101bf96517108fe969c4aad9e5c4f3614] Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git
git bisect good 35c2c30101bf96517108fe969c4aad9e5c4f3614
# bad: [e52d7cc2f41223d070975c370f67686bd3213b41] Merge branch 'perf-tools' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
git bisect bad e52d7cc2f41223d070975c370f67686bd3213b41
# good: [163126388d62798769acd2cd1753839771dc12c6] Merge branch 'hyperv-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
git bisect good 163126388d62798769acd2cd1753839771dc12c6
# good: [5d176a6d15a456002e90e1776648396e7f0d57d3] Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
git bisect good 5d176a6d15a456002e90e1776648396e7f0d57d3
# bad: [c6d16b526a80a3215164f7e66c704dcb838e1810] Merge branch 'gpio/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
git bisect bad c6d16b526a80a3215164f7e66c704dcb838e1810
# bad: [81570d6a7ad37033c7895811551a5a9023706eda] gpiolib: protect gpio_chip with SRCU in array_info paths in multi get/set
git bisect bad 81570d6a7ad37033c7895811551a5a9023706eda
# bad: [4e667a1968099c6deadee2313ecd648f8f0a8956] gpio: vf610: add locking to gpio direction functions
git bisect bad 4e667a1968099c6deadee2313ecd648f8f0a8956
# bad: [9d846b1aebbe488f245f1aa463802ff9c34cc078] gpiolib: check the return value of gpio_chip::get_direction()
git bisect bad 9d846b1aebbe488f245f1aa463802ff9c34cc078
# first bad commit: [9d846b1aebbe488f245f1aa463802ff9c34cc078] gpiolib: check the return value of gpio_chip::get_direction()

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux