Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2010 00:26:52 +0600
From:      Eugene Grosbein <eugen@eg.sd.rdtc.ru>
To:        Jack Vogel <jfvogel@gmail.com>
Cc:        freebsd-net <freebsd-net@freebsd.org>, Eugene Grosbein <eugen@eg.sd.rdtc.ru>
Subject:   Re: em(4) updated to version 7.1.8
Message-ID:  <20101129182652.GA33150@rdtc.ru>
In-Reply-To: <AANLkTin4=kN27dMeWXzGUpTpx9HiZ3T-aymbyjMrsBn8@mail.gmail.com>
References:  <AANLkTikwcRW%2BdqY=NTSbJsr3daEd-8usPo0Rw%2BhA_D-8@mail.gmail.com> <AANLkTin3%2BbCaXoPxTQsvzmqgtpA1zSY8f17Qh-nqymPw@mail.gmail.com> <201011270946271408828@yahoo.com.cn> <AANLkTikG8RJQw%2Bh1SHZPs1cHGrM%2B3LfniZrdLqVoPVtr@mail.gmail.com> <AANLkTi=YjG40%2BDj7471wyv3aeXGJgoL1GC33iNaypsrW@mail.gmail.com> <AANLkTi=LgejYxRXnxLtkvB-Qfp2u%2BtySdriWHfGWPQjL@mail.gmail.com> <20101128081617.GA90332@zibbi.meraka.csir.co.za> <AANLkTinF1fovumkeXxWgaKi_bNiUCnqgWAtdaCaXELzO@mail.gmail.com> <20101129175128.GA32977@rdtc.ru> <AANLkTin4=kN27dMeWXzGUpTpx9HiZ3T-aymbyjMrsBn8@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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