Date: Mon, 6 Feb 2012 11:50:09 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: freebsd-net@FreeBSD.org Subject: Re: kern/164696: VIMAGE + carp panics the kernel Message-ID: <201202061150.q16Bo9Op051683@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/164696; it has been noted by GNATS. From: Gleb Smirnoff <glebius@FreeBSD.org> To: Nikos Vassiliadis <nvass@gmx.com> Cc: freebsd-gnats-submit@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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202061150.q16Bo9Op051683>