svn commit: r240938 - head/sys/net

Ed Maste emaste at freebsd.org
Wed Sep 26 12:48:04 UTC 2012


On 26 September 2012 00:52, Konstantin Belousov <kostikbel at gmail.com> wrote:
> On Tue, Sep 25, 2012 at 10:10:14PM +0000, Ed Maste wrote:
>> Author: emaste
>> Date: Tue Sep 25 22:10:14 2012
>> New Revision: 240938
>> URL: http://svn.freebsd.org/changeset/base/240938
>>
>> Log:
>>   Avoid INVARIANTS panic destroying an in-use tap(4)
>>
>>   The requirement (implied by the KASSERT in tap_destroy) that the tap is
>>   closed isn't valid; destroy_dev will block in devdrn while other threads
>>   are in d_* functions.
> Are you sure ?
>
> The device may be opened, but no threads could be in any cdevsw
> methods. destroy_dev(9) only waits for threads to leave cdevsw methods,
> and not for the close to happen.

My first approach mirrored if_tun, but jhb@ pointed out on IRC that
any open devices will revert to dead_devsw so that future accesses
will fail.

-Ed


More information about the svn-src-head mailing list