From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 3 10:00:33 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DAB416A41C for ; Sun, 3 Jul 2005 10:00:33 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44C5643D48 for ; Sun, 3 Jul 2005 10:00:33 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j63A0XYB038692 for ; Sun, 3 Jul 2005 10:00:33 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j63A0Wh6038690; Sun, 3 Jul 2005 10:00:33 GMT (envelope-from gnats) Resent-Date: Sun, 3 Jul 2005 10:00:33 GMT Resent-Message-Id: <200507031000.j63A0Wh6038690@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, LiangYi Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9314816A41C for ; Sun, 3 Jul 2005 09:54:39 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F10F43D49 for ; Sun, 3 Jul 2005 09:54:39 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j639sc36019547 for ; Sun, 3 Jul 2005 09:54:39 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j639scs0019440; Sun, 3 Jul 2005 09:54:38 GMT (envelope-from nobody) Message-Id: <200507030954.j639scs0019440@www.freebsd.org> Date: Sun, 3 Jul 2005 09:54:38 GMT From: LiangYi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/82919: Bridge configuration update will crash the system in 5.4 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 10:00:33 -0000 >Number: 82919 >Category: kern >Synopsis: Bridge configuration update will crash the system in 5.4 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 03 10:00:32 GMT 2005 >Closed-Date: >Last-Modified: >Originator: LiangYi >Release: FreeBSD 5.4-RELEASE >Organization: lingzhou network Inc >Environment: FreeBSD bsd.lingzhou.com.cn 5.4-RELEASE FreeBSD 5.4-RELEASE #0 >Description: Setup a bridge like this sysctl -w net.link.ether.bridge_cfg="em0:1,em1:1" Generate some traffic on this bridge Update the bridge configuration like this sysctl -w net.link.ether.bridge_cfg="em1:1,em2:1" System will crash randomly. >How-To-Repeat: >Fix: --- bridge.c.orig Sun Jul 3 17:31:55 2005 +++ bridge.c Sun Jul 3 17:33:17 2005 @@ -767,13 +767,19 @@ struct ifnet *dst, *old; bdg_hash_table *bt; /* location in hash table */ int dropit = BDG_MUTED(ifp); + struct cluster_softc *clp; /* * hash the source address */ BDG_LOCK(); index = HASH_FN(eh->ether_shost); - bt = &BDG_CLUSTER(ifp)->ht[index]; + clp = BDG_CLUSTER(ifp); + if(clp==NULL) { + BDG_UNLOCK(); + return BDG_DROP; + } + bt = &clp->ht[index]; bt->used = 1; old = bt->name; if (old) { /* the entry is valid */ >Release-Note: >Audit-Trail: >Unformatted: