From nobody@FreeBSD.org  Fri Sep 24 15:49:49 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9850B106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Sep 2010 15:49:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 86DC48FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Sep 2010 15:49:49 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o8OFnnpQ053616
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Sep 2010 15:49:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o8OFnnQW053615;
	Fri, 24 Sep 2010 15:49:49 GMT
	(envelope-from nobody)
Message-Id: <201009241549.o8OFnnQW053615@www.freebsd.org>
Date: Fri, 24 Sep 2010 15:49:49 GMT
From: Andrew Boyer <aboyer@averesystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ixgbe][igb] Panic when packets are dropped with header split disabled
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150920
>Category:       kern
>Synopsis:       [ixgbe][igb] Panic when packets are dropped with header split disabled
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 24 15:50:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Tue Nov  2 10:20:07 UTC 2010
>Originator:     Andrew Boyer
>Release:        7.1p3
>Organization:
Avere Systems Inc.
>Environment:
amd64
>Description:
The ixgbe and igb drivers have *_rx_discard methods which attempt to
reuse mbufs in the rx_ring.  They fail to check whether the mbuf pointers
are valid before dereferencing them, though.  This causes a panic when
header split is disabled, because the rbuf->m_head pointer will always be NULL.
>How-To-Repeat:
Found by adding a failure point in ixgbe_rxeof() right before the staterr
check.  The first packet that's rejected causes a panic.
>Fix:
Check for NULL pointers before dereferencing mh and mp in ixgbe_rx_discard()
and igb_rx_discard().

I don't see any other places where m_head is used without being checked.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Sep 26 21:21:59 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150920 

From: Eugene Grosbein <egrosbein@rdtc.ru>
To: bug-followup@freebsd.org
Cc: jfv@freebsd.org
Subject: Re: kern/150920: [ixgbe][igb] Panic when packets are dropped with
 header split disabled
Date: Tue, 02 Nov 2010 15:41:39 +0600

 This problem seems to be fixed in sys/dev/e1000/if_igb.c,v1.60
 but not in STABLE (there were no MFC yet).
 
 By the way, I'm experiencing kernel panics in em(4)
 for two distinct very loaded routers based on em-supported NICs
 (no crashdumps collected yet, sorry). And I see very similar code
 in if_em.c without a check for NULL pointer before dereferencing,
 this time without a fix even in HEAD.
 
 Eugene Grosbein
>Unformatted:
