diff options
author | Jia-Ju Bai <[email protected]> | 2018-09-15 11:04:40 +0800 |
---|---|---|
committer | Felipe Balbi <[email protected]> | 2018-10-02 10:33:24 +0300 |
commit | 2337a77c1cc86bc4e504ecf3799f947659c86026 (patch) | |
tree | fb85600f837904092bf5bbf8099ef4cdc81b0967 /tools/perf/scripts/python/intel-pt-events.py | |
parent | dccf1bad4be7eaa096c1f3697bd37883f9a08ecb (diff) |
usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()
The driver may sleep in an interrupt handler.
The function call path (from bottom to top) in Linux-4.17 is:
[FUNC] fotg210_ep_queue(GFP_KERNEL)
drivers/usb/gadget/udc/fotg210-udc.c, 744:
fotg210_ep_queue in fotg210_get_status
drivers/usb/gadget/udc/fotg210-udc.c, 768:
fotg210_get_status in fotg210_setup_packet
drivers/usb/gadget/udc/fotg210-udc.c, 949:
fotg210_setup_packet in fotg210_irq (interrupt handler)
To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.
If possible, spin_unlock() and spin_lock() around fotg210_ep_queue()
can be also removed.
This bug is found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions