From owner-freebsd-net@FreeBSD.ORG Sun Jun 10 20:49:29 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7A3C1065674 for ; Sun, 10 Jun 2012 20:49:29 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 88CE48FC12 for ; Sun, 10 Jun 2012 20:49:29 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so4918359pbb.13 for ; Sun, 10 Jun 2012 13:49:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=ry4ZAt8PxcZAJhSTMzpKON4rBEZrgfoxyWYVs/H318Y=; b=hGdTZnJEkl1ZQbeQbeCXwI5kQiuthTFTaprR3r/HiCYmK/w/JhsLmMsU3I8eenYAqF Ii44z70Se1CmLd3L4Inkc7wKuDfRQujNHTaOVgeBaDrV7wkEcxKr78lA0DxrtCiFJXTM nf53y8n4uNUgrMgonlnWBOc7gsjHYCBFBUu4/DMoG5bOo9Qc1z5ilYXDpptW4G60hoT0 xAwrZMuX2dpkVEu5euSdS9SujDd+btWc6NWN4AmLMOy4hODf1N/RKi60SWMOy6F4IbJ6 8cfmL7psQ1/AFMeS/gmeskwdSuMyTNAYypXqDXd3CTcrA6AqtWvfswjUCX6mO70m5eEJ xx1A== MIME-Version: 1.0 Received: by 10.68.197.198 with SMTP id iw6mr19438445pbc.36.1339361369146; Sun, 10 Jun 2012 13:49:29 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.73.161 with HTTP; Sun, 10 Jun 2012 13:49:29 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Jun 2012 08:49:29 +1200 X-Google-Sender-Auth: m_zDPkzZ0EvqnZY0bNs88Ups_O0 Message-ID: From: Andrew Thompson To: Gustau Perez Querol Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQm+CLTaNFId8i7AS4837668NIllrTQWfIBoLwPyFUoBIWoNcDhK95WwqxU+8cQz+HLow8HS Cc: net@freebsd.org Subject: Re: Panic with if_bridge when removing components X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2012 20:49:29 -0000 On 10 June 2012 02:27, Gustau Perez Querol wrote: > =A0Hi, > > =A0I'm seeing panics when removing an interface of a bridge. The system r= uns > HEAD/AMD64 r236733. I see no changes to if_bridge.c in the last two days,= so > I would say the problem's still there. I also checked stable and the prob= lem > should be there too. > > =A0The problem is that I have a bridge composed of two ethernet interface= s, an > ath interface and a tap. As soon as I remove any of them the system panic= s. > Because the system runs openvpn with the tap connected to the bridge, whe= n > the system starts to reboot, the openvpn daemon removes the tap and thus > causing also the panic. > > =A0The panic comes because at sys/net/if_bridge.c:943 the struct > *ifnet->if_bridge of the interface removed is set to NULL too early. Beca= use > of this, at sys/net/if_bridge.c:996 we call if_bridge.c:bridge_linkstate > where the struct *ifnet->if_bridge is needed. This causes the panic. I introduced this issue in r234487, please try this patch. http://people.freebsd.org/~thompsa/bridge_link.diff regards, Andrew