From aj@toad.stack.nl  Sat May 30 04:39:06 1998
Received: from toad.stack.nl (aj@toad.stack.nl [131.155.140.135])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA05208
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 May 1998 04:39:04 -0700 (PDT)
          (envelope-from aj@toad.stack.nl)
Received: (from aj@localhost)
	by toad.stack.nl (8.8.8/8.8.7) id NAA17900
	for FreeBSD-gnats-submit@freebsd.org; Sat, 30 May 1998 13:38:54 +0200 (CEST)
	(envelope-from aj)
Message-Id: <199805301138.NAA17900@toad.stack.nl>
Date: Sat, 30 May 1998 13:38:54 +0200 (CEST)
From: Arend-Jan Wijtzes <aj@toad.stack.nl>
To: FreeBSD-gnats-submit@freebsd.org
Subject: send-pr form for you

>Number:         6796
>Category:       kern
>Synopsis:       [PATCH] kernel/NFS crash from user land
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 30 04:40:01 PDT 1998
>Closed-Date:    Wed Jun 3 11:03:16 PDT 1998
>Last-Modified:  Wed Jun  3 11:07:08 PDT 1998
>Originator:     Arend-jan Wijtzes
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
M.C.G.V. Stack
>Environment:

	must have NFS mounted filesystem

>Description:

machine freezes when hardlinking a device to a file on a NFS
filesystem. like ln /dev/null testblebber (on NFS mounted fs)
Looks like the cross-filesytem check fails.

>How-To-Repeat:

ln /dev/null file

>Fix:

Not really a solution, but a 'fix':

--- /usr/src/sys/kern/vfs_syscalls.c	Thu May 28 15:46:03 1998
+++ /usr/src/sys/kern/vfs_syscalls.c	Thu May 28 15:47:28 1998
@@ -904,7 +904,9 @@
 	if (error)
 		return (error);
 	vp = nd.ni_vp;
-	if (vp->v_type == VDIR)
+	if ((vp->v_type == VCHR) || (vp->v_type == VBLK))
+		error = EPERM;		/* STACK HACK gehaktdag */
+	else if (vp->v_type == VDIR)
 		error = EPERM;		/* POSIX */
 	else {
 		NDINIT(&nd, CREATE, LOCKPARENT, UIO_USERSPACE, uap->link, p);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: phk 
Responsible-Changed-When: Tue Jun 2 04:11:10 PDT 1998 
Responsible-Changed-Why:  
Mr nfs... 
State-Changed-From-To: open->closed 
State-Changed-By: peter 
State-Changed-When: Wed Jun 3 11:03:16 PDT 1998 
State-Changed-Why:  
Fixed rev 1.91 of sys/nfs/nfs_vnops.c and rev 1.36.2.7 in -stable. 
Problem was fixed at source (nfs_link() was aborting wrong vp). 
>Unformatted:
Hi. As send-pr is broken at this time, here is the form by mail.

SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR: 
SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo
SEND-PR: manual if you are not sure how to fill out a problem report.
SEND-PR:
SEND-PR: Note that the Synopsis field is mandatory.  The Subject (for
SEND-PR: the mail) will be made the same as Synopsis unless explicitly
SEND-PR: changed.
SEND-PR:
SEND-PR: Choose from the following categories:
SEND-PR:
SEND-PR: bin   conf  docs  gnu   i386  kern  misc  ports 
SEND-PR:
To: FreeBSD-gnats-submit@freebsd.org
Subject: 
From: aj@stack.nl
Reply-To: aj@stack.nl
X-send-pr-version: 3.2


