[Bug 193696] New: CAM AC_FOUND_DEVICE calls malloc(M_WAITOK) from THREAD_NO_SLEEPING() context
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Sep 16 21:50:19 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193696
Bug ID: 193696
Summary: CAM AC_FOUND_DEVICE calls malloc(M_WAITOK) from
THREAD_NO_SLEEPING() context
Product: Base System
Version: 11.0-CURRENT
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: smferris at gmail.com
The CAM xpt_done_td is marked THREAD_NO_SLEEPING. This is problematic since
the AC_FOUND_DEVICE async events still call functions such as disk_alloc() and
devstat_alloc() that malloc with M_WAITOK, so they could sleep, which panics
the
kernel.
You can spot the problem more easily by adding an ASSERT in malloc
that checks for M_WAITOK and THREAD_CAN_SLEEP, and then removing and
re-adding a device at run-time. At least with mps, the initial device
creation works since it runs from dainit() in an intr config hook.
I'll attach a patch with the assertion that highlights the problem.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list