From owner-freebsd-current@FreeBSD.ORG Fri Dec 3 07:07:18 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BD6F16A4CE; Fri, 3 Dec 2004 07:07:18 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id B075D43D5D; Fri, 3 Dec 2004 07:07:17 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iB377FAw013074; Fri, 3 Dec 2004 08:07:15 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Robert Watson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 02 Dec 2004 23:35:14 GMT." Date: Fri, 03 Dec 2004 08:07:15 +0100 Message-ID: <13073.1102057635@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: current@FreeBSD.org Subject: Re: VOP_* changes causes NULL ptr dereference for acl_get_file(3) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2004 07:07:18 -0000 Can you try this patch instead: Index: kern/vfs_default.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_default.c,v retrieving revision 1.109 diff -u -r1.109 vfs_default.c --- kern/vfs_default.c 1 Dec 2004 23:16:36 -0000 1.109 +++ kern/vfs_default.c 3 Dec 2004 07:06:35 -0000 @@ -72,6 +72,8 @@ struct vop_vector default_vnodeops = { .vop_default = NULL, + .vop_bypass = VOP_EOPNOTSUPP, + .vop_advlock = VOP_EINVAL, .vop_bmap = vop_stdbmap, .vop_close = VOP_NULL, @@ -79,7 +81,7 @@ .vop_destroyvobject = vop_stddestroyvobject, .vop_fsync = VOP_NULL, .vop_getpages = vop_stdgetpages, - .vop_getvobject = vop_stdgetvobject, + .vop_getvobject = vop_stdgetvobject, .vop_getwritemount = vop_stdgetwritemount, .vop_inactive = vop_stdinactive, .vop_ioctl = VOP_ENOTTY, In message , Robe rt Watson writes: >On Thu, 2 Dec 2004, Mark Santcroos wrote: > >> I need at least the following patch to keep my system alive. A simple >> call to acl_get_file(3) is enough to crash the machine. >> >> You will have to think a bit more about how you want to initialize stuff >> or about better defaults for cases like ACLs. > >Should probably be using VOP_EOPNOTSUPP rather than VOP_EINVAL, I think. >Also, it's likely that if you need a vop_getacl entry here, you probably >also want a vop_setacl and a vop_checkacl entry. > >Robert N M Watson FreeBSD Core Team, TrustedBSD Projects >robert@fledge.watson.org Principal Research Scientist, McAfee Research > > >> >> Mark >> >> ==== //depot/projects/custom/kern/vfs_default.c#35 - /home/marks/proj/perforce/projects/custom/kern/vfs_default.c ==== >> @@ -95,6 +95,7 @@ >> .vop_revoke = VOP_PANIC, >> .vop_strategy = vop_nostrategy, >> .vop_unlock = vop_stdunlock, >> + .vop_getacl = VOP_EINVAL, >> }; >> >> /* >> >> -- >> RIPE NCC - Delft University of Technology - The FreeBSD Project > marks@ripe.net - m.a.santcroos@ewi.tudelft.nl - marks@freebsd.org >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >> > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.