summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/uss720.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-09-01 17:23:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-05 14:36:53 +0200
commit6d4f268fa132742fe96dad22307c68d237356d88 (patch)
treee749a7236433361e8cf2fc9c2f830a0b65efe6d7 /drivers/usb/misc/uss720.c
parentf9a5b4f58b280c1d26255376713c132f93837621 (diff)
downloadtalos-obmc-linux-6d4f268fa132742fe96dad22307c68d237356d88.tar.gz
talos-obmc-linux-6d4f268fa132742fe96dad22307c68d237356d88.zip
usb: host: u132-hcd: Fix a sleep-in-atomic-context bug in u132_get_frame()
i_usX2Y_subs_startup in usbusx2yaudio.c is a completion handler function for the USB driver. So it should not sleep, but it is can sleep according to the function call paths (from bottom to top) in Linux-4.16. [FUNC] msleep drivers/usb/host/u132-hcd.c, 2558: msleep in u132_get_frame drivers/usb/core/hcd.c, 2231: [FUNC_PTR]u132_get_frame in usb_hcd_get_frame_number drivers/usb/core/usb.c, 822: usb_hcd_get_frame_number in usb_get_current_frame_number sound/usb/usx2y/usbusx2yaudio.c, 303: usb_get_current_frame_number in i_usX2Y_urb_complete sound/usb/usx2y/usbusx2yaudio.c, 366: i_usX2Y_urb_complete in i_usX2Y_subs_startup Note that [FUNC_PTR] means a function pointer call is used. To fix this bug, msleep() is replaced with mdelay(). This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/uss720.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud