Date: Wed, 14 Aug 2019 20:47:30 +0200 From: Hans Petter Selasky <hps@selasky.org> To: John Baldwin <jhb@FreeBSD.org>, Ian Lepore <ian@freebsd.org>, Neeraj Pal <neerajpal09@gmail.com>, freebsd-arch@freebsd.org Subject: Re: Regarding the bug in FreeBSD kernel driver(s) Message-ID: <acd8bfc2-c9e3-3614-f816-58416331aa99@selasky.org> In-Reply-To: <3c8e80d0-d5c8-8e13-bdd4-50f509416550@FreeBSD.org> References: <CANi4_RUcNt8Z0Gw1DqoOCAYt61kfhv2aoz1v9snrB_Jg38z_zQ@mail.gmail.com> <cb4108b6e8494259e31d1ab7d5163ae77a2a2116.camel@freebsd.org> <52d24915-d295-806d-55c6-f801ef340c7f@selasky.org> <3c8e80d0-d5c8-8e13-bdd4-50f509416550@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?acd8bfc2-c9e3-3614-f816-58416331aa99>