From owner-freebsd-net@FreeBSD.ORG Mon Feb 6 11:50:09 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF264106566B for ; Mon, 6 Feb 2012 11:50:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AE47A8FC08 for ; Mon, 6 Feb 2012 11:50:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q16Bo9tP051684 for ; Mon, 6 Feb 2012 11:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q16Bo9Op051683; Mon, 6 Feb 2012 11:50:09 GMT (envelope-from gnats) Date: Mon, 6 Feb 2012 11:50:09 GMT Message-Id: <201202061150.q16Bo9Op051683@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Gleb Smirnoff Cc: Subject: Re: kern/164696: VIMAGE + carp panics the kernel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gleb Smirnoff List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2012 11:50:09 -0000 The following reply was made to PR kern/164696; it has been noted by GNATS. From: Gleb Smirnoff To: Nikos Vassiliadis 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--