kern/164696: VIMAGE + carp panics the kernel
Gleb Smirnoff
glebius at FreeBSD.org
Mon Feb 6 11:50:09 UTC 2012
The following reply was made to PR kern/164696; it has been noted by GNATS.
From: Gleb Smirnoff <glebius at FreeBSD.org>
To: Nikos Vassiliadis <nvass at gmx.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: kern/164696: VIMAGE + carp panics the kernel
Date: Mon, 6 Feb 2012 15:47:41 +0400
--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
Hi, Nikos!
On Wed, Feb 01, 2012 at 10:40:35PM +0000, Nikos Vassiliadis wrote:
N> >Description:
N> Trying to use a carp interface in a VIMAGE enabled kernel, panics the kernel.
Can you please test another patch, that is attached?
--
Totus tuus, Glebius.
--TakKZr9L6Hm6aLOc
Content-Type: text/x-diff; charset=koi8-r
Content-Disposition: attachment; filename="164696.diff"
Index: ip_carp.c
===================================================================
--- ip_carp.c (revision 231067)
+++ ip_carp.c (working copy)
@@ -707,19 +707,24 @@
LIST_FOREACH(sc, &carp_list, sc_next)
if (sc->sc_state == MASTER) {
CARP_LOCK(sc);
+ CURVNET_SET(sc->sc_carpdev->if_vnet);
carp_send_ad_locked(sc);
+ CURVNET_RESTORE();
CARP_UNLOCK(sc);
}
mtx_unlock(&carp_mtx);
}
+/* Send a periodic advertisement, executed in callout context. */
static void
carp_send_ad(void *v)
{
struct carp_softc *sc = v;
CARP_LOCK_ASSERT(sc);
+ CURVNET_SET(sc->sc_carpdev->if_vnet);
carp_send_ad_locked(sc);
+ CURVNET_RESTORE();
CARP_UNLOCK(sc);
}
@@ -1090,6 +1095,7 @@
return (0);
}
+/* Master down timeout event, executed in callout context. */
static void
carp_master_down(void *v)
{
@@ -1097,12 +1103,14 @@
CARP_LOCK_ASSERT(sc);
+ CURVNET_SET(sc->sc_carpdev->if_vnet);
if (sc->sc_state == BACKUP) {
CARP_LOG("VHID %u@%s: BACKUP -> MASTER (master down)\n",
sc->sc_vhid,
sc->sc_carpdev->if_xname);
carp_master_down_locked(sc);
}
+ CURVNET_RESTORE();
CARP_UNLOCK(sc);
}
--TakKZr9L6Hm6aLOc--
More information about the freebsd-net
mailing list