Date: Wed, 12 Jan 2005 06:29:39 GMT From: Michael Conlen <meconlen@obfuscated.net> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/76126: FreeBSD 4.11 client will send a NFS request to rename a file to itself to the NFS server, no error returned Message-ID: <200501120629.j0C6TdlG014893@www.freebsd.org> Resent-Message-ID: <200501120630.j0C6UblT086819@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 76126
>Category: kern
>Synopsis: FreeBSD 4.11 client will send a NFS request to rename a file to itself to the NFS server, no error returned
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 12 06:30:37 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Michael Conlen
>Release: FreeBSD 4.11-STABLE client FreeBSD 5.3-p3 Server
>Organization:
Obfuscated Networking
>Environment:
FreeBSD web10.tarhost.com 4.11-STABLE FreeBSD 4.11-STABLE #2: Mon Jan 3 19:30:17 EST 2005 root@web10.tarhost.com:/usr/obj/usr/src/sys/WWW i386
>Description:
A FreeBSD 4.11 client keeps sending requests to move a file to the same file name. The server complains but there's no error on the client to say hey! bad software! bad!
>How-To-Repeat:
on an NFS mounted filesystem
$ echo foo > foo
$ mv foo foo
$ echo $?
0
$
>Fix:
The following patch should work
$ diff -u `pwd`/nfs_vnops.c.orig `pwd`/nfs_vnops.c
--- /usr/src/sys/nfs/nfs_vnops.c.orig Wed Jan 12 00:15:42 2005
+++ /usr/src/sys/nfs/nfs_vnops.c Wed Jan 12 01:00:41 2005
@@ -1647,6 +1647,12 @@
goto out;
}
+ if (fvp == tvf) {
+ printf("nfs_rename: fvp == tvp (can't happen)\n");
+ error = 0;
+ goto out;
+ }
+
/*
* We have to flush B_DELWRI data prior to renaming
* the file. If we don't, the delayed-write buffers
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501120629.j0C6TdlG014893>
