diff options
author | glebius <glebius@FreeBSD.org> | 2005-09-09 08:41:39 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-09-09 08:41:39 +0000 |
commit | 044310140d19ff0446c5718f045a8b841b3ad079 (patch) | |
tree | 611872b2fd687ae5137ef961907579eb49847b3d /sys/netinet | |
parent | d03626c7d60a1113b002cdc903e26f3bff19e3f2 (diff) | |
download | FreeBSD-src-044310140d19ff0446c5718f045a8b841b3ad079.zip FreeBSD-src-044310140d19ff0446c5718f045a8b841b3ad079.tar.gz |
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.
Diffstat (limited to 'sys/netinet')
-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 606bf1c..7dd72c1 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); } |