Regarding the bug in FreeBSD kernel driver(s)
Hans Petter Selasky
hps at selasky.org
Tue Aug 13 20:15:44 UTC 2019
On 2019-08-13 22:08, Ian Lepore wrote:
> So once a device is attached the first time, its usb ivars are wiped
> out. That code was surely written in a time before the devctl stuff
> was added to allow disabling/enabling a device on the fly. I'm not
> sure whether it will be easy to keep the ivar data around, but if so, I
> think that would be the right fix.
>
> The NULL pointer checks in the patches will prevent a kernel panic, but
> don't really make devctl enable work properly. Speaking of devctl, you
> don't need a program to test this, you can do it from the command line:
>
> devctl disable uhub2
> devctl enable uhub2
> <panic happens here>
Hi,
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.
Should we perhaps teach devctl to not touch USB devices?
--HPS
More information about the freebsd-arch
mailing list