Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2004 18:48:28 +0200
From:      Max Laier <max@love2party.net>
To:        Gilbert Cao <hika@bsdmon.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Kernel panic with pf
Message-ID:  <200410241848.35446.max@love2party.net>
In-Reply-To: <20041024160235.GA1016@bsdmon.com>
References:  <20041024144754.GA1670@bsdmon.com> <200410241722.34910.max@love2party.net> <20041024160235.GA1016@bsdmon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart6540196.794D3IZyG3
Content-Type: multipart/mixed;
  boundary="Boundary-01=_ez9eB3CzEWHq24F"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--Boundary-01=_ez9eB3CzEWHq24F
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Sunday 24 October 2004 18:02, Gilbert Cao wrote:
> On Sun, Oct 24, 2004 at 05:22:27PM +0200, Max Laier wrote:
> > Are you running with debug.mpsafenet=3D0? In order to use user/group ru=
le
> > modificators you have to run with debug.mpsafenet=3D0 as there is a pro=
blem
> > with locks. This is mentioned in the BUGS section of pf.conf(5). Please
> > tell me if the problem is persistent with debug.mpsafenet turned off.
> >
> > Thanks.
>
> I have debug.mpsafenet=3D1 when my kernel panics,
> but I just have the same problem with debug.mpsafenet=3D0 in
> /boot/loader.conf ...

Hmmm ... that's bad. Can you please test the attached patch. It is a wild=20
guess as I am currently not able to test. Please tell me if it helps.

=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

--Boundary-01=_ez9eB3CzEWHq24F
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="pf.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="pf.c.diff"

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);

--Boundary-01=_ez9eB3CzEWHq24F--

--nextPart6540196.794D3IZyG3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQBBe9zjXyyEoT62BG0RAns+AJ9g6kemq3w1u1YUlDBlPc6y+TxsvgCePdR+
o7yI7P1a/Tht8RW1Bp5eHF0=
=/4LZ
-----END PGP SIGNATURE-----

--nextPart6540196.794D3IZyG3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410241848.35446.max>