Commit 815a1b5
Bartosz Golaszewski
gpio: take the SRCU read lock in gpiod_hog()
gpiod_hog() may be called without the gpio_device SRCU read lock taken
so we need to do it here as well. It's alright if someone else is
already holding the lock as SRCU read critical sections can be nested.
Fixes: d83cee3 ("gpio: protect the pointer to gpio_chip in gpio_device with SRCU")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202402122234.d85cca9b-lkp@intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>1 parent e3f927f commit 815a1b5
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4492 | 4492 | | |
4493 | 4493 | | |
4494 | 4494 | | |
4495 | | - | |
| 4495 | + | |
4496 | 4496 | | |
4497 | 4497 | | |
4498 | 4498 | | |
4499 | 4499 | | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
4500 | 4504 | | |
4501 | 4505 | | |
4502 | 4506 | | |
4503 | | - | |
4504 | 4507 | | |
4505 | 4508 | | |
4506 | | - | |
| 4509 | + | |
4507 | 4510 | | |
4508 | 4511 | | |
4509 | 4512 | | |
4510 | 4513 | | |
4511 | 4514 | | |
4512 | | - | |
| 4515 | + | |
4513 | 4516 | | |
4514 | 4517 | | |
4515 | 4518 | | |
| |||
0 commit comments