From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 15 15:38:27 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D977F16A4B3 for ; Mon, 15 Sep 2003 15:38:27 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEB6B43F3F for ; Mon, 15 Sep 2003 15:38:26 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h8FMb9rO030752; Mon, 15 Sep 2003 18:37:09 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h8FMb9IC030749; Mon, 15 Sep 2003 18:37:09 -0400 (EDT) Date: Mon, 15 Sep 2003 18:37:08 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Maxim Konovalov In-Reply-To: <20030915081818.F29770@news1.macomnet.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: sysadmin@wvths.com cc: hackers@freebsd.org Subject: Re: 4.8-stable kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2003 22:38:28 -0000 If one of you has had a chance to test this properly, please go ahead and commit. I don't have remote -STABLE development boxes, so haven't been able to do any -STABLE merging since I went to BSDCon. I did get RE permission to MFC this change. FYI, I have a bunch more related changes in a patch that I can dig up once I'm caught up on work re-mail. There are a number of M_TRYWAIT scenarios where we don't test the return value -- some easier to fix than others. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories On Mon, 15 Sep 2003, Maxim Konovalov wrote: > On Sun, 14 Sep 2003, 23:05-0500, Mike Silbersack wrote: > > > > > On Sun, 14 Sep 2003 sysadmin@wvths.com wrote: > > > > > Hello, > > > > > > It's been almost a month now since I posted the original message on the > > > list and I'm wondering about the progress on resolving this problem. > > > > > > I still can reproduce the panics after cvs-supping to RELENG_4 ~ 23:00 EDT > > > today. > > > > > > Thanks much. > > > > Ooops, I forgot to follow up on this. > > > > Ok, a few questions: > > > > 1. Can you compile INVARIANTS and INVARIANT_SUPPORT into your kernel? > > That might help us track down the problem. > > > > 2. What does your network setup look like? Are you using divert sockets, > > is there ppp in action, etc. > > > > I believe that I tried out your script at the time, and I couldn't find it > > to cause any problems on my system. > > rwatson has fixed this panic in rev. 1.115 in -current: > > revision 1.115 > date: 2003/08/26 14:11:48; author: rwatson; state: Exp; lines: +2 -0 > M_PREPEND() with an argument of M_TRYWAIT can fail, meaning the > returned mbuf can be NULL. Check for NULL in rip_output() when > prepending an IP header. This prevents mbuf exhaustion from > causing a local kernel panic when sending raw IP packets. > > PR: kern/55886 > Reported by: Pawel Malachowski > MFC after: 3 days > > and haven't MFCed it yet. Here is a patch for -stable: > > Index: sys/netinet/raw_ip.c > =================================================================== > RCS file: /home/ncvs/src/sys/netinet/raw_ip.c,v > retrieving revision 1.64.2.17 > diff -u -r1.64.2.17 raw_ip.c > --- sys/netinet/raw_ip.c 9 Sep 2003 19:09:22 -0000 1.64.2.17 > +++ sys/netinet/raw_ip.c 15 Sep 2003 04:21:59 -0000 > @@ -257,6 +257,8 @@ > return(EMSGSIZE); > } > M_PREPEND(m, sizeof(struct ip), M_WAIT); > + if (m == NULL) > + return(ENOBUFS); > ip = mtod(m, struct ip *); > ip->ip_tos = inp->inp_ip_tos; > ip->ip_off = 0; > %%% > > -- > Maxim Konovalov, maxim@macomnet.ru, maxim@FreeBSD.org >