From owner-freebsd-net@FreeBSD.ORG Mon Aug 23 12:40:04 2010 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 10E431065694 for ; Mon, 23 Aug 2010 12:40:04 +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 008D48FC12 for ; Mon, 23 Aug 2010 12:40:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7NCe3FE083185 for ; Mon, 23 Aug 2010 12:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7NCe3k7083184; Mon, 23 Aug 2010 12:40:03 GMT (envelope-from gnats) Date: Mon, 23 Aug 2010 12:40:03 GMT Message-Id: <201008231240.o7NCe3k7083184@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Arthur Hartwig Cc: Subject: Re: kern/144642: [rum] [panic] Enabling rum interface causes panic X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Arthur Hartwig List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 12:40:04 -0000 The following reply was made to PR kern/144642; it has been noted by GNATS. From: Arthur Hartwig To: bug-followup@FreeBSD.org, a_hartwig@fastmail.fm Cc: Subject: Re: kern/144642: [rum] [panic] Enabling rum interface causes panic Date: Mon, 23 Aug 2010 22:16:37 +1000 The problem still exists in FreeBSD 8.1 Release. This patch stops by panic soon after setting the interface up: # diff -b -C 7 if_rum.c.orig if_rum.c *** if_rum.c.orig Tue Aug 10 15:05:51 2010 --- if_rum.c Tue Aug 10 20:34:20 2010 *************** *** 2109,2122 **** --- 2109,2127 ---- rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; const struct ieee80211_txparam *tp; struct rum_tx_desc desc; struct mbuf *m0; + /* Guard against default ni_chan */ + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) { + return 0; + } + m0 = ieee80211_beacon_alloc(vap->iv_bss,&RUM_VAP(vap)->bo); if (m0 == NULL) { return ENOBUFS; } tp =&vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)]; rum_setup_tx_desc(sc,&desc, RT2573_TX_TIMESTAMP, RT2573_TX_HWSEQ, # At the suggestion of Alex Kozlov I ran the shell script: for i in `jot - 1 200`; do sudo /etc/rc.d/netif start; done on my 2x800MHz PIII system and it did not panic. Alex ran it on some more recent systems and still saw panics. While I think FreeBSD should be "bullet proof" I believe this patch should still be accepted since it makes the system at least somewhat more robust. The code for the newer run driver makes the same kind of test as suggested by this patch before calling ieee80211_beacon_alloc().