[Bug 239973] Kernel Panic: device_get_ivars(9) returns NULL which leads to Null pointer dereference for multiple drivers

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Sep 15 14:12:50 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239973

--- Comment #3 from Neeraj <neerajpal09 at gmail.com> ---
(In reply to Hans Petter Selasky from comment #2)

yeah you right. Actually, as per the discussion going in the mailing list,
other developers said that the patch is correct *if and only if want to
preserve the ivars information* and preserving the info would be a long term
solution.

But, as you said that there might be a race, that devctl is 
attaching/detaching drivers while USB is doing the same, it might go into the
panic due to that.

So,  you are correct on the point that USB drivers are not supposed to be
managed outside the USB enumeration thread. Using devctl on USB driver is not
supported. Only usbconfig is allowed to attach/detach USB devices.

And, I also think that it is a better solution to blacklist devctl from
touching USB device nodes or anything that parents to a usbusX, instead of
patching all the devices. As, we already have usbconfig to do the same.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list