From owner-freebsd-net@FreeBSD.ORG Mon Nov 29 19:50:26 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 3D3F9106566C for ; Mon, 29 Nov 2010 19:50:26 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id BD69D8FC13 for ; Mon, 29 Nov 2010 19:50:21 +0000 (UTC) Received: by wyf19 with SMTP id 19so4746582wyf.13 for ; Mon, 29 Nov 2010 11:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=9Y/uh0hAGNxNJEcPitjFGrtdrWp91+WGR+3HpvtCtAU=; b=Z+vVjTuJrs1DccoC8i8jXMY6Swos/azJJyjhAZJ0gV/ZzMXsQ5xiNCDtXFZUDs9NAS BBOYgbw8szcnauWJYsJhqwQ9M4MOulu0RxRyI/E0nuymu16L9dCURbpbVdjuaS0QVFsN PYZXtQRiWbmFWApmaIMBMpxniF8QGJ4/0wKdw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vVax57sEX3FZnHmyd4Jsv5E1mXL0LydtGMqN+JBUYnNHqZccSo/4ySdwHWImVd7BIT lTPNCsdAOV6Y5M6faaguJMJg5qJK+uHF2YeFcI3m1mP2d3EpZYN+zexiXMWE80XaDChA CYAEF/UtK+0aQNbyaznGnu/iLaeIzsgBmZmaw= MIME-Version: 1.0 Received: by 10.216.3.3 with SMTP id 3mr862702weg.57.1291060219796; Mon, 29 Nov 2010 11:50:19 -0800 (PST) Received: by 10.216.2.206 with HTTP; Mon, 29 Nov 2010 11:50:19 -0800 (PST) In-Reply-To: <20101129192312.GA33547@rdtc.ru> References: <201011270946271408828@yahoo.com.cn> <20101128081617.GA90332@zibbi.meraka.csir.co.za> <20101129175128.GA32977@rdtc.ru> <20101129182652.GA33150@rdtc.ru> <20101129192312.GA33547@rdtc.ru> Date: Mon, 29 Nov 2010 11:50:19 -0800 Message-ID: From: Jack Vogel To: Eugene Grosbein Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net 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 19:50:26 -0000 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 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; > } >