aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fault-inject.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2022-12-12 13:07:48 +0000
committerBartosz Golaszewski <[email protected]>2022-12-14 08:53:20 +0000
commit11e47bbd700f31bd1ee9f8863381bc9e741c0e97 (patch)
treeb473952fb5ec31d0979d850d0ce236102281b345 /lib/fault-inject.c
parentgpiolib: protect the GPIO device against being dropped while in use by user-s... (diff)
downloadkernel-11e47bbd700f31bd1ee9f8863381bc9e741c0e97.tar.gz
kernel-11e47bbd700f31bd1ee9f8863381bc9e741c0e97.zip
gpio: sim: set a limit on the number of GPIOs
With the removal of ARCH_NR_GPIOS in commit 7b61212f2a07 ("gpiolib: Get rid of ARCH_NR_GPIOS") the gpiolib core no longer sanitizes the number of GPIOs for us. This causes the gpio-sim selftests to now fail when setting the number of GPIOs to 99999 and expecting the probe() to fail. Set a sane limit of 1024 on the number of simulated GPIOs and bail out of probe if it's exceeded. Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/oe-lkp/[email protected] Fixes: 7b61212f2a07 ("gpiolib: Get rid of ARCH_NR_GPIOS") Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions