Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 1999 20:26:18 -0500 (EST)
From:      Brian Feldman <green@unixhelp.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        mike@smith.net.au, current@FreeBSD.ORG, dillon@apollo.backplane.com, julian@whistle.com
Subject:   Re: kernel malloc and M_CANWAIT
Message-ID:  <Pine.BSF.4.05.9901182020280.5579-100000@janus.syracuse.net>
In-Reply-To: <199901182221.JAA18722@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 19 Jan 1999, Bruce Evans wrote:

> >Look at the void () functions that call malloc/MALLOC. Also, commit the
> >attached patch; it was OKed by Bruce to disallow this, but he seems to forget
> >to commit it.
> 
> It is queued behind 10-100 other patches.
> 
> >--- src/sys/kern/vfs_syscalls.c.orig	Fri Dec 25 22:27:21 1998
> >+++ src/sys/kern/vfs_syscalls.c	Fri Dec 25 22:28:12 1998
> >@@ -2909,6 +2909,10 @@
> > 	if (error = namei(&nd))
> > 		return (error);
> > 	vp = nd.ni_vp;
> >+	if (vp->v_type == VFIFO) {
> >+		error = EINVAL;
> >+		goto out;
> >+	}
> > 	if (error = VOP_GETATTR(vp, &vattr, p->p_ucred, p))
> > 		goto out;
> > 	if (p->p_ucred->cr_uid != vattr.va_uid &&
> 
> Actually, the patch from Lite1 is queued.  It also backs out support
> for revoke of everything except cdevs and bdevs.  I don't have time to
> check what happens for regular files, pipes and sockets...

Hmm... that may be a good idea, although for it seems to work on all of them,
I haven't checked for any kind of leak in the others, nor would truly expect
one. And pipes ARE fifo's aren't they?

> 
> Bruce
> 

 Brian Feldman					  _ __  ___ ___ ___  
 green@unixhelp.org			      _ __ ___ | _ ) __|   \ 
	     http://www.freebsd.org/	 _ __ ___ ____ | _ \__ \ |) |
 FreeBSD: The Power to Serve!	   _ __ ___ ____ _____ |___/___/___/ 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901182020280.5579-100000>