NetBSD Problem Report #1644
From gnats Wed Oct 18 07:15:07 1995
Received: from bloom-beacon.MIT.EDU by pain.lcs.mit.edu (8.6.9/8.6.9) with ESMTP id GAA19849 for <gnats-bugs@gnats.netbsd.org>; Wed, 18 Oct 1995 06:27:31 -0400
Message-Id: <199510180356.XAA03620@pattern.arlington.ma.us>
Date: Tue, 17 Oct 1995 23:56:23 -0400
From: John Kohl <jtk@kolvir.arlington.ma.us>
To: gnats-bugs@gnats.netbsd.org
Subject: msdosfs panics (locking against myself) with mv foo.xxx foo.xxx.~1~
>Number: 1644
>Category: kern
>Synopsis: msdosfs panics (locking against myself) with mv foo.xxx foo.xxx.~1~
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 18 07:20:32 +0000 1995
>Closed-Date: Thu May 16 03:38:12 +0000 1996
>Last-Modified: Tue Jan 21 08:49:04 +0000 2014
>Originator: John Kohl
>Release: NetBSD-current, roughly 1995/09/22
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:
System: NetBSD pattern 1.0A NetBSD 1.0A (PATTERN) #128: Mon Sep 25 23:09:21 EDT 1995 jtk@pattern:/u1/NetBSD-current/src/sys/arch/i386/compile/PATTERN i386
>Description:
in msdosfs, this will panic a system with DIAGNOSTIC or hang a process
without DIAGNOSTIC:
% mv foo.xxx foo.xxx.~1~
>How-To-Repeat:
do that
>Fix:
===================================================================
RCS file: RCS/msdosfs_vnops.c,v
retrieving revision 1.1
diff -c -r1.1 msdosfs_vnops.c
*** msdosfs_vnops.c 1995/09/26 02:42:21 1.1
--- msdosfs_vnops.c 1995/09/26 03:08:47
***************
*** 876,882 ****
vrele(fvp);
return (error);
}
!
/*
* Convert the filename in tcnp into a dos filename. We copy this
* into the denode and directory entry for the destination
--- 876,903 ----
vrele(fvp);
return (error);
}
! /*
! * Check for rename onto itself. e.g. rename("foo.emu", "foo.emu.~1~")
! * which appears to the vnode layer as just like renaming one
! * hardlinked file onto the other. It happens here due to name
! * mapping.
! * (Can it happen due to hard links in a corrupted file system?
! * should we worry about that?)
! */
! if (fvp == tvp) {
! /*
! * the "to" name is valid, but so is the "from" name.
! * what should we return as an error code?
! * 0 is not quite right--the source still exists and the user
! * may have uttered different file names. However, it's probably
! * the closest to correct.
! *
! * maybe EMLINK?
! */
! error = 0 /*EMLINK*/;
! goto abortit;
! }
!
/*
* Convert the filename in tcnp into a dos filename. We copy this
* into the denode and directory entry for the destination
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jtk
State-Changed-When: Wed May 15 23:38:12 EDT 1996
State-Changed-Why:
duplicate of 1513
.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.