diff options
author | Linus Walleij <[email protected]> | 2020-03-06 14:23:26 +0100 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2020-03-11 15:55:03 +0100 |
commit | 8959b304c7062889b1276092cc8590dc1ba98f65 (patch) | |
tree | 0149e54d643bf600e2df45205ba1980063c1702b /tools/perf/util/trace-event-scripting.c | |
parent | f8788d86ab28f61f7b46eb6be375f8a726783636 (diff) |
gpiolib: Fix irq_disable() semantics
The implementation if .irq_disable() which kicks in between
the gpiolib and the driver is not properly mimicking the
expected semantics of the irqchip core: the irqchip will
call .irq_disable() if that exists, else it will call
mask_irq() which first checks if .irq_mask() is defined
before calling it.
Since we are calling it unconditionally, we get this bug
from drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c, as it only
defines .irq_mask_ack and not .irq_mask:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = (ptrval)
(...)
PC is at 0x0
LR is at gpiochip_irq_disable+0x20/0x30
Fix this by only calling .irq_mask() if it exists.
Cc: Brian Masney <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: [email protected]
Reviewed-by: Bartosz Golaszewski <[email protected]>
Fixes: 461c1a7d4733 ("gpiolib: override irq_enable/disable")
Signed-off-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions