Date: Mon, 29 Nov 2010 11:50:19 -0800 From: Jack Vogel <jfvogel@gmail.com> To: Eugene Grosbein <eugen@eg.sd.rdtc.ru> Cc: freebsd-net <freebsd-net@freebsd.org> Subject: Re: em(4) updated to version 7.1.8 Message-ID: <AANLkTikYPfyqvuuwZa_AdwyhCY4o73ymP3TMr1GvPM8M@mail.gmail.com> In-Reply-To: <20101129192312.GA33547@rdtc.ru> References: <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> <20101129182652.GA33150@rdtc.ru> <AANLkTimL1VHbjjv7a6RTdyj4VGcJxfNfTjc4fCcaSHXY@mail.gmail.com> <20101129192312.GA33547@rdtc.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
True, there is no check, I do not see a way in which the mbuf pointer should be NULL, however, perhaps I should change things to follow what the igb driver does, always checking for NULL and freeing the existing mbuf to allow em_refresh_mbufs() to repop. If you say you have had panics then there must be a path to have it NULL. Jack On Mon, Nov 29, 2010 at 11:23 AM, Eugene Grosbein <eugen@eg.sd.rdtc.ru>wrote: > On Mon, Nov 29, 2010 at 11:10:22AM -0800, Jack Vogel wrote: > > > Not sure what code you created this from, but its not the new driver, > > Yes, that's for previous version and that's what keeps my production > servers from panicing. > > > things have been reorganized and I do not believe this issue exists. > > Please test with the latest. > > I'd rather not risk. Here is the same check for today's RELENG_8 driver. > Please, please take a look. After several days of nearly gigabit load > it has already happened m_head was NULL here, in previous version. > Can it be possible in current version? > There is still no check before dereferencing. > > --- if_em.c.orig 2010-11-30 01:16:17.000000000 +0600 > +++ if_em.c 2010-11-30 01:19:09.000000000 +0600 > @@ -4321,10 +4321,12 @@ > > /* Reset state, keep loaded DMA map and reuse */ > m = rbuf->m_head; > + if(m) { > m->m_len = m->m_pkthdr.len = adapter->rx_mbuf_sz; > m->m_flags |= M_PKTHDR; > m->m_data = m->m_ext.ext_buf; > m->m_next = NULL; > + } > > return; > } >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikYPfyqvuuwZa_AdwyhCY4o73ymP3TMr1GvPM8M>