Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 2021 01:06:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 234985] epair: Kernel panic when destroying epair interface of vnet jail after using ifconfig inside the jail
Message-ID:  <bug-234985-7501-2a1YAMbG2Q@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-234985-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-234985-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234985

--- Comment #25 from commit-hook@FreeBSD.org ---
A commit in branch releng/12.1 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3De0c15f45abd4bd5165e11b557a8c90d0f=
af5cfeb

commit e0c15f45abd4bd5165e11b557a8c90d0faf5cfeb
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-01-18 21:55:53 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-01-29 00:58:55 +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 t=
he
    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 if=
net
is
    used.

    Prevent this race by ensuring that vnet_if_return() cannot run at the s=
ame
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(-)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234985-7501-2a1YAMbG2Q>