Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!ITAI@TECHUNIX.BITNET From: ITAI@TECHUNIX.BITNET Newsgroups: net.bugs.4bsd Subject: Re: 4.2 hangs with locked root inode Message-ID: <5489@ucbvax.ARPA> Date: Thu, 14-Mar-85 05:56:34 EST Article-I.D.: ucbvax.5489 Posted: Thu Mar 14 05:56:34 1985 Date-Received: Fri, 15-Mar-85 01:09:29 EST Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 30 From: itai@techunix.bitnet (Itai Nahshon) Well, I know of another bug causing same results which can be repeated easily. The bug is in the function getmdev() in sys/sys/ufs_mount.c. when You try to mount/umount a non block device it's inode is locked (by namei) but not released (by iput as in the case of block device). Another attempt to access that inode will lock the directory and so on till root is locked. repeat-by: I tried to mount /dev/rmtxx. (a character device). after I failed I tried it again (this time /dev was locked) and after a short time the whole system was locked. P.S. mounting /dev/mtxx (the tape blocked device, as read only) worked on 4.1BSD but not working on 4.2. Anyone knows why ? fix: change the routine getmdev() to iput() the non block file before returning an error. (warning: should not iput a NULL in case namei fails, only if namei succeeds but the file mode doesn't match). Itai Nahshon. Technion, Israel institute of technology Haifa, Israel BITNET: itai@techunix.BITNET ARPANET: itai%techunix.BITNET@wiscvm.ARPA