mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] usb: xhci: Two possible sleep-in-atomic-context bugs
@ 2018-06-20  3:12 Jia-Ju Bai
  2018-06-20  3:28 ` Peter Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Jia-Ju Bai @ 2018-06-20  3:12 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, Linux Kernel Mailing List

The driver may sleep with holding a spinlock.
The function call paths (from bottom to top) in Linux-4.16.7 are:

[FUNC] schedule
drivers/base/power/runtime.c, 741: schedule in rpm_resume
drivers/base/power/runtime.c, 1322: rpm_resume in pm_runtime_forbid
drivers/usb/host/xhci-hub.c, 647: pm_runtime_forbid in xhci_enter_test_mode
drivers/usb/host/xhci-hub.c, 632: _raw_spin_lock_irqsave in 
xhci_enter_test_mode

[FUNC] schedule
drivers/base/power/runtime.c, 570: schedule in rpm_suspend
drivers/base/power/runtime.c, 434: rpm_suspend in rpm_idle
drivers/base/power/runtime.c, 1343: rpm_idle in pm_runtime_allow
drivers/usb/host/xhci-hub.c, 670: pm_runtime_allow in xhci_exit_test_mode
drivers/usb/host/xhci-hub.c, 1387: xhci_exit_test_mode in xhci_hub_control
drivers/usb/host/xhci-hub.c, 1038: _raw_spin_lock_irqsave in 
xhci_hub_control

These bugs are found by my static analysis tool (DSAC-2) and checked by my
code review.

I do not know how to correctly fix these bugs, so I just report them.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-20  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20  3:12 [BUG] usb: xhci: Two possible sleep-in-atomic-context bugs Jia-Ju Bai
2018-06-20  3:28 ` Peter Chen
2018-06-20  9:15   ` Mathias Nyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome