aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-starfive.c
diff options
context:
space:
mode:
authorPrashanth K <[email protected]>2023-05-09 13:27:52 +0000
committerGreg Kroah-Hartman <[email protected]>2023-05-29 14:22:47 +0000
commite5990469943c711cb00bfde6338d2add6c6d0bfe (patch)
tree3a2d0733d82f6b3ac979946d1c3dc3d5d267b228 /drivers/usb/cdns3/cdns3-starfive.c
parentusb: gadget: u_serial: Add null pointer check in gserial_suspend (diff)
downloadkernel-e5990469943c711cb00bfde6338d2add6c6d0bfe.tar.gz
kernel-e5990469943c711cb00bfde6338d2add6c6d0bfe.zip
usb: gadget: u_serial: Avoid spinlock recursion in __gs_console_push
When serial console over USB is enabled, gs_console_connect queues gs_console_work, where it acquires the spinlock and queues the usb request, and this request goes to gadget layer. Now consider a situation where gadget layer prints something to dmesg, this will eventually call gs_console_write() which requires cons->lock. And this causes spinlock recursion. Avoid this by excluding usb_ep_queue from the spinlock. spin_lock_irqsave //needs cons->lock gs_console_write . . _printk __warn_printk dev_warn/pr_err . . [USB Gadget Layer] . . usb_ep_queue gs_console_work __gs_console_push // acquires cons->lock process_one_work Signed-off-by: Prashanth K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-starfive.c')
0 files changed, 0 insertions, 0 deletions