[Bug 244703] sys.netpfil.pf.nat.exhaust panics kernel

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 29 01:21:18 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244703

--- Comment #13 from commit-hook at FreeBSD.org ---
A commit in branch releng/12.2 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=e682b62c96e94c60d830e4414215032e0d4f8dad

commit e682b62c96e94c60d830e4414215032e0d4f8dad
Author:     Kristof Provost <kp at FreeBSD.org>
AuthorDate: 2020-09-12 16:33:05 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-01-29 01:14:24 +0000

    MFC r368237: if: Fix panic when destroying vnet and epair simultaneously

    When destroying a vnet and an epair (with one end in the vnet) we often
    panicked. This was the result of the destruction of the epair, which
destroys
    both ends simultaneously, happening while vnet_if_return() was moving the
    struct ifnet to its home vnet. This can result in a freed ifnet being
re-added
    to the home vnet V_ifnet list. That in turn panics the next time the ifnet
is
    used.

    Prevent this race by ensuring that vnet_if_return() cannot run at the same
time
    as if_detach() or epair_clone_destroy().

    PR:             238870, 234985, 244703, 250870
    Sponsored by:   Modirum MDPay
    Approved by:    so

 sys/net/if.c     | 147 +++++++++++++++++++++++++++++++++++++------------------
 sys/net/if_var.h |  24 ++-------
 2 files changed, 104 insertions(+), 67 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-testing mailing list