[Bug 293548] kernel panic with tun interfaces

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 06 Mar 2026 02:04:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293548

Zhenlei Huang <zlei@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zlei@FreeBSD.org

--- Comment #9 from Zhenlei Huang <zlei@FreeBSD.org> ---
Created attachment 268562
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268562&action=edit
Check ifnet's flag first

(In reply to Kyle Evans from comment #8)

> On the other hand, thinking about it: we only destroy the mutex after doing an
> if_detach + if_free, but is it the case (CC glebius@) that the ifnet isn't fully
> detached until an epoch elapses, so we very well could have some packets lingering
> and should defer-reclaim those last bits?

I see one problem with the driver. For the outbound traffic, the path is `net
stack` -> `drivers`. Then the ifnet's flag `if_flags` should be checked
firstly, and then the driver's one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.