From owner-freebsd-net@FreeBSD.ORG Sun Oct 24 19:14:15 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4925016A4CE for ; Sun, 24 Oct 2004 19:14:15 +0000 (GMT) Received: from mail.bsdmon.com (ALyon-203-1-3-117.w80-14.abo.wanadoo.fr [80.14.178.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA1C943D1D for ; Sun, 24 Oct 2004 19:14:11 +0000 (GMT) (envelope-from hika@bsdmon.com) Received: from localhost (localhost [127.0.0.1]) by sdf1.macross.vfx (Postfix) with ESMTP id 01F613F85A; Sun, 24 Oct 2004 21:14:08 +0200 (CEST) Received: from mail.bsdmon.com ([127.0.0.1]) by localhost (sdf1.bsdmon.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00581-02; Sun, 24 Oct 2004 21:14:07 +0200 (CEST) Received: by sdf1.macross.vfx (Postfix, from userid 1001) id 03ED23F862; Sun, 24 Oct 2004 21:14:06 +0200 (CEST) Date: Sun, 24 Oct 2004 21:14:06 +0200 From: Gilbert Cao To: Max Laier Message-ID: <20041024191406.GA1022@bsdmon.com> References: <20041024144754.GA1670@bsdmon.com> <200410241722.34910.max@love2party.net> <20041024160235.GA1016@bsdmon.com> <200410241848.35446.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410241848.35446.max@love2party.net> X-Operating-System: FreeBSD 5.3-RC1 i386 Organization: BSDMon User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new cc: freebsd-net@freebsd.org Subject: Re: Kernel panic with pf X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2004 19:14:15 -0000 On Sun, Oct 24, 2004 at 06:48:28PM +0200, Max Laier wrote: > > Hmmm ... that's bad. Can you please test the attached patch. It is a wild > guess as I am currently not able to test. Please tell me if it helps. > > -- > /"\ Best regards, | mlaier@freebsd.org > \ / Max Laier | ICQ #67774661 > X http://pf4freebsd.love2party.net/ | mlaier@EFnet > / \ ASCII Ribbon Campaign | Against HTML Mail and News > Index: pf.c > =================================================================== > RCS file: /usr/store/mlaier/fcvs/src/sys/contrib/pf/net/pf.c,v > retrieving revision 1.18.2.2 > diff -u -r1.18.2.2 pf.c > --- pf.c 3 Oct 2004 17:04:39 -0000 1.18.2.2 > +++ pf.c 24 Oct 2004 16:45:33 -0000 > @@ -2506,6 +2506,11 @@ > } > #ifdef __FreeBSD__ > INP_LOCK(inp); > + if ((inp->inp_socket == NULL) || (inp->inp_socket->so_cred == NULL)) { > + INP_UNLOCK(inp); > + INP_INFO_RUNLOCK(pi); > + return (0); > + } > *uid = inp->inp_socket->so_cred->cr_uid; > *gid = inp->inp_socket->so_cred->cr_groups[0]; > INP_UNLOCK(inp); Thanks. That works, no panic. Should I also test with debug.mpsafenet=0, or is it useless ? Gilbert Cao.