summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mpc8xxx.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-12-18 21:26:05 +0800
committerLinus Walleij <linus.walleij@linaro.org>2020-01-07 13:37:11 +0100
commite36eaf94be8f7bc4e686246eed3cf92d845e2ef8 (patch)
tree35e276dbcb0a9666d6e339cbd75e68d4b4f9794d /drivers/gpio/gpio-mpc8xxx.c
parent25d071b3f6dbe4c4b9c9d0df76fbe9292310e799 (diff)
downloadlinux-e36eaf94be8f7bc4e686246eed3cf92d845e2ef8.tar.bz2
gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_irq_map/unmap()
The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: drivers/gpio/gpio-grgpio.c, 261: request_irq in grgpio_irq_map drivers/gpio/gpio-grgpio.c, 255: _raw_spin_lock_irqsave in grgpio_irq_map drivers/gpio/gpio-grgpio.c, 318: free_irq in grgpio_irq_unmap drivers/gpio/gpio-grgpio.c, 299: _raw_spin_lock_irqsave in grgpio_irq_unmap request_irq() and free_irq() can sleep at runtime. To fix these bugs, request_irq() and free_irq() are called without holding the spinlock. These bugs are found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20191218132605.10594-1-baijiaju1990@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mpc8xxx.c')
0 files changed, 0 insertions, 0 deletions