From owner-freebsd-net@FreeBSD.ORG Sun Oct 24 19:28:26 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 86D6616A4CE for ; Sun, 24 Oct 2004 19:28:26 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFCA043D2D for ; Sun, 24 Oct 2004 19:28:25 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.209] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CLo2S-0002eG-00; Sun, 24 Oct 2004 21:28:24 +0200 Received: from [84.128.128.40] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CLo2R-0001x4-00; Sun, 24 Oct 2004 21:28:24 +0200 From: Max Laier To: freebsd-net@freebsd.org Date: Sun, 24 Oct 2004 21:27:46 +0200 User-Agent: KMail/1.7 References: <20041024144754.GA1670@bsdmon.com> <200410241848.35446.max@love2party.net> <20041024191406.GA1022@bsdmon.com> In-Reply-To: <20041024191406.GA1022@bsdmon.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1194873.PyyCbIgSAv"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410242127.53782.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: Gilbert Cao 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:28:26 -0000 --nextPart1194873.PyyCbIgSAv Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 24 October 2004 21:14, Gilbert Cao wrote: > 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 wi= ld > > 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 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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 =3D=3D NULL) || (inp->inp_socket->so_cred =3D=3D= NULL)) { > > + INP_UNLOCK(inp); > > + INP_INFO_RUNLOCK(pi); > > + return (0); > > + } > > *uid =3D inp->inp_socket->so_cred->cr_uid; > > *gid =3D inp->inp_socket->so_cred->cr_groups[0]; > > INP_UNLOCK(inp); > > Thanks. > That works, no panic. Thanks. Going to commit it. > Should I also test with debug.mpsafenet=3D0, or is it useless ? You should not use user/group rules in a debug.mpsafenet=3D1 environment. I= t=20 will cause hard lockups and the like. The fix for these lockups is non-=20 trivial and will take some more time. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1194873.PyyCbIgSAv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBfAI5XyyEoT62BG0RAhRfAJ0WQ8tz4TByMP+KPYfU2eoRasnbQwCfYeE1 4l3LT9IlIUWztHdEH2bXW5s= =9U7p -----END PGP SIGNATURE----- --nextPart1194873.PyyCbIgSAv--