Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 2008 09:03:58 -0800
From:      Sam Leffler <sam@errno.com>
To:        freebsd-stable@freebsd.org
Subject:   [Fwd: Re: kern/123552: [ath] [panic] kernel panic during network activity on ath0]
Message-ID:  <4926E9FE.1070302@errno.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000101020904040304050309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Folks having problems with ath on releng7 should try the attached patch.

    Sam


--------------000101020904040304050309
Content-Type: text/plain;
 name="net80211.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="net80211.patch"

Index: ieee80211_freebsd.h
===================================================================
RCS file: /usr/ncvs/src/sys/net80211/ieee80211_freebsd.h,v
retrieving revision 1.15.2.1
diff -u -r1.15.2.1 ieee80211_freebsd.h
--- ieee80211_freebsd.h	11 Nov 2007 17:44:35 -0000	1.15.2.1
+++ ieee80211_freebsd.h	21 Nov 2008 03:32:42 -0000
@@ -197,9 +197,10 @@
 #define	M_LINK0		M_PROTO1		/* WEP requested */
 #define	M_PWR_SAV	M_PROTO4		/* bypass PS handling */
 #define	M_MORE_DATA	M_PROTO5		/* more data frames to follow */
-#define	M_FF		0x20000			/* fast frame */
-#define	M_TXCB		0x40000			/* do tx complete callback */
-#define	M_80211_TX	(0x60000|M_PROTO1|M_WME_AC_MASK|M_PROTO4|M_PROTO5)
+#define	M_FF		M_PROTO6		/* fast frame */
+#define	M_TXCB		M_PROTO7		/* do tx complete callback */
+#define	M_80211_TX \
+	(M_LINK0|M_WME_AC_MASK|M_PWR_SAV|M_MORE_DATA|M_FF|M_TXCB)
 
 /* rx path usage */
 #define	M_AMPDU		M_PROTO1		/* A-MPDU processing done */

--------------000101020904040304050309
Content-Type: message/rfc822;
	name="Re: kern/123552: [ath] [panic] kernel panic during network
	activity on ath0.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename*0="Re: kern/123552: [ath] [panic] kernel panic during network
	a"; filename*1="ctivity on ath0.eml"

Message-ID: <49261239.7060003@freebsd.org>
Date: Thu, 20 Nov 2008 17:43:21 -0800
From: Sam Leffler <sam@freebsd.org>
Organization: FreeBSD Project
User-Agent: Thunderbird 2.0.0.9 (X11/20071125)
MIME-Version: 1.0
To: Guy Coleman <gtc@mm.st>
Subject: Re: kern/123552: [ath] [panic] kernel panic during network activity
	on ath0
References: <200811202220.mAKMK3h9042175@freefall.freebsd.org>
In-Reply-To: <200811202220.mAKMK3h9042175@freefall.freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Here is the reason in net80211/ieee80211_freebsd.h:

/* tx path usage */
#define M_LINK0         M_PROTO1                /* WEP requested */
#define M_PWR_SAV       M_PROTO4                /* bypass PS handling */
#define M_MORE_DATA     M_PROTO5                /* more data frames to 
follow */
#define M_FF            0x20000                 /* fast frame */
#define M_TXCB          0x40000                 /* do tx complete 
callback */
#define M_80211_TX      (0x60000|M_PROTO1|M_WME_AC_MASK|M_PROTO4|M_PROTO5)

M_FF and M_TXCB overlay M_PROMISC and M_NOFREE.  Please try reverting 
your change and then set M_FF to M_PROTO6 and M_TXCB M_PROTO7.

    Sam

Guy Coleman wrote:
> The following reply was made to PR kern/123552; it has been noted by GNATS.
>
> From: Guy Coleman <gtc@mm.st>
> To: bug-followup@FreeBSD.org
> Cc:  
> Subject: Re: kern/123552: [ath] [panic] kernel panic during network activity
>  on ath0
> Date: Thu, 20 Nov 2008 21:51:37 +0000
>
>  I've found that partially reverting revs 1.181.2.2 and 1.181.2.4 of 
>  sys/net/bpf.c stops the panic from happening. I have no idea why.
>  
>  --- bpf.c.bak	2008-11-09 19:46:55.000000000 +0000
>  +++ bpf.c	2008-11-16 22:37:10.000000000 +0000
>  @@ -85,6 +85,8 @@
>  
>    #define PRINET  26			/* interruptible */
>  
>  +#define	M_SKIP_BPF	M_SKIP_FIREWALL
>  +
>    /*
>     * bpf_iflist is a list of BPF interface structures, each 
>  corresponding to a
>     * specific DLT.  The same network interface might have several BPF 
>  interface
>  @@ -653,7 +655,7 @@
>    			mc->m_pkthdr.rcvif = ifp;
>    		/* Set M_PROMISC for outgoing packets to be discarded. */
>    		if (d->bd_direction == BPF_D_INOUT)
>  -			m->m_flags |= M_PROMISC;
>  +			m->m_flags |= M_SKIP_BPF;
>    	} else
>    		mc = NULL;
>  
>  @@ -1358,9 +1360,8 @@
>    	int gottime;
>    	struct timeval tv;
>  
>  -	/* Skip outgoing duplicate packets. */
>  -	if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) {
>  -		m->m_flags &= ~M_PROMISC;
>  +	if (m->m_flags & M_SKIP_BPF) {
>  +		m->m_flags &= ~M_SKIP_BPF;
>    		return;
>    	}
>  
>  @@ -1413,9 +1414,8 @@
>    	int gottime;
>    	struct timeval tv;
>  
>  -	/* Skip outgoing duplicate packets. */
>  -	if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) {
>  -		m->m_flags &= ~M_PROMISC;
>  +	if (m->m_flags & M_SKIP_BPF) {
>  +		m->m_flags &= ~M_SKIP_BPF;
>    		return;
>    	}
>  
>  
>
>
>   



--------------000101020904040304050309--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4926E9FE.1070302>