diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-09-09 08:41:39 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-09-09 08:41:39 +0000 |
commit | 5d40d65b5a4dc7305f8f4bde7c10d5cbb2329654 (patch) | |
tree | 611872b2fd687ae5137ef961907579eb49847b3d | |
parent | f353d3388f45513ffba8ec7612c808e832ac9a32 (diff) | |
download | src-5d40d65b5a4dc7305f8f4bde7c10d5cbb2329654.tar.gz src-5d40d65b5a4dc7305f8f4bde7c10d5cbb2329654.zip |
When a carp(4) interface is being destroyed and is in a promiscous mode,
first interface is detached from parent and then bpfdetach() is called.
If the interface was the last carp(4) interface attached to parent, then
the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
we panic on destroyed mutex.
To prevent the above scenario, clear pointer to parent, when we detach
ourselves from parent.
Notes
Notes:
svn path=/head/; revision=149907
-rw-r--r-- | sys/netinet/ip_carp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 606bf1c93179..7dd72c17eb12 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -443,6 +443,7 @@ carp_clone_destroy(struct ifnet *ifp) CARP_LOCK_DESTROY(cif); FREE(cif, M_CARP); ifpromisc(sc->sc_carpdev, 0); + sc->sc_carpdev = NULL; } else { CARP_UNLOCK(cif); } |