Regarding the bug in FreeBSD kernel driver(s)

Hans Petter Selasky hps at selasky.org
Wed Aug 14 18:48:16 UTC 2019


On 2019-08-14 17:47, John Baldwin wrote:
> I think fixing USB to not break by preserving ivars is probably a better
> long-term solution.  ivars are not supposed to be freed and rebuilt but
> should exist for the lifetime of a device_t.

Even if you fix the ivars, there might be a race, that devctl is 
attaching/detaching drivers while USB is doing the same. So basically if 
you add that NULL check, running devctl in a tight loop will still 
provoke a panic. That's why I think devctl should come with a warning by 
default.

--HPS


More information about the freebsd-arch mailing list