4.2 hangs with locked root inode

ITAI at TECHUNIX.BITNET ITAI at TECHUNIX.BITNET
Thu Mar 14 20:56:34 AEST 1985


From: itai at 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 at techunix.BITNET
ARPANET:	itai%techunix.BITNET at wiscvm.ARPA



More information about the Comp.bugs.4bsd.ucb-fixes mailing list