Date: Thu, 24 Dec 1998 11:04:45 -0500 (EST) From: Brian Feldman <green@unixhelp.org> To: current@FreeBSD.ORG Subject: revoke of fifos Message-ID: <Pine.BSF.4.05.9812241059190.19127-100000@janus.syracuse.net>
next in thread | raw e-mail | index | archive | help
revoke(2) on VFIFO types is broken now, leading to stranded mbuf's. I suppose
bde is tracking this down, but for now, why don't we return EINVAL in revoke(2)?
/usr/src/sys/kern/vfs_syscalls.c: unmodified, readonly: line 2912 of 3038 [95%]
if (vp->v_type == VFIFO) {
error = EINVAL;
goto out;
}
That should temporarily work to prevent the following easily reproducible mbuf-
starvation crash case:
(as any user)
mkfifo fifo
while true; do dd if=fifo of=/dev/null & dd if=/dev/zero of=fifo & ./revoke \
fifo; done
where revoke.c is on the lines of
#include <stdio.h>
#include <unistd.h>
int
main(int argc, char **argv) {
if (!argv[1])
exit(1);
printf("revoke(%s) == %d\n", argv[1], revoke(argv[1]));
exit(0);
}
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.9812241059190.19127-100000>
