From owner-freebsd-net@FreeBSD.ORG Mon Nov 29 18:26:54 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB2301065672 for ; Mon, 29 Nov 2010 18:26:54 +0000 (UTC) (envelope-from eugen@eg.sd.rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [62.231.161.221]) by mx1.freebsd.org (Postfix) with ESMTP id 1074F8FC15 for ; Mon, 29 Nov 2010 18:26:53 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.4/8.14.4) with ESMTP id oATIQq5A033192; Tue, 30 Nov 2010 00:26:52 +0600 (NOVT) (envelope-from eugen@eg.sd.rdtc.ru) Received: (from eugen@localhost) by eg.sd.rdtc.ru (8.14.4/8.14.4/Submit) id oATIQqjl033191; Tue, 30 Nov 2010 00:26:52 +0600 (NOVT) (envelope-from eugen) Date: Tue, 30 Nov 2010 00:26:52 +0600 From: Eugene Grosbein To: Jack Vogel Message-ID: <20101129182652.GA33150@rdtc.ru> References: <201011270946271408828@yahoo.com.cn> <20101128081617.GA90332@zibbi.meraka.csir.co.za> <20101129175128.GA32977@rdtc.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net , Eugene Grosbein Subject: Re: em(4) updated to version 7.1.8 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: Mon, 29 Nov 2010 18:26:54 -0000 On Mon, Nov 29, 2010 at 09:54:55AM -0800, Jack Vogel wrote: > Thanks for reporting that, will see it gets fixed! More serious problem. I had experienced kernel panics for two em(4)-based heavy loaded routers. I've checked PR database and found this PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=150920 I've found the same lack of NULL pointer check in em(4), applied following patch to if_em.c and panics have gone. It seems for me that new driver code still has this problem, now this code resides inside em_rx_discard() function. Please take a look. --- if_em.c.orig 2010-11-02 15:45:56.000000000 +0600 +++ if_em.c 2010-11-08 14:24:46.000000000 +0600 @@ -4181,9 +4181,11 @@ ifp->if_ierrors++; /* Reuse loaded DMA map and just update mbuf chain */ mp = rxr->rx_buffers[i].m_head; + if(mp) { mp->m_len = mp->m_pkthdr.len = MCLBYTES; mp->m_data = mp->m_ext.ext_buf; mp->m_next = NULL; + } if (adapter->max_frame_size <= (MCLBYTES - ETHER_ALIGN)) m_adj(mp, ETHER_ALIGN); Eugene Grosbein