freebsd-dev/sys/ufs
Bruce Evans 1c1752872f Fixed breakage of mknod() in rev.1.48 of ext2_vnops.c and rev.1.126 of
ufs_vnops.c:

1) i_ino was confused with i_number, so the inode number passed to
   VFS_VGET() was usually wrong (usually 0U).
2) ip was dereferenced after vgone() freed it, so the inode number
   passed to VFS_VGET() was sometimes not even wrong.

Bug (1) was usually fatal in ext2_mknod(), since ext2fs doesn't have
space for inode 0 on the disk; ino_to_fsba() subtracts 1 from the
inode number, so inode number 0U gives a way out of bounds array
index.  Bug(1) was usually harmless in ufs_mknod(); ino_to_fsba()
doesn't subtract 1, and VFS_VGET() reads suitable garbage (all 0's?)
from the disk for the invalid inode number 0U; ufs_mknod() returns
a wrong vnode, but most callers just vput() it; the correct vnode is
eventually obtained by an implicit VFS_VGET() just like it used to be.

Bug (2) usually doesn't happen.
2000-11-04 08:10:56 +00:00
..
ffs Initial commit of IFS - a inode-namespaced FFS. Here is a short 2000-10-14 03:02:30 +00:00
ifs Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing 2000-10-29 14:54:55 +00:00
mfs Add VOP_*VOBJECT vops, because MFS requires explicit vop specification. 2000-09-12 16:21:16 +00:00
ufs Fixed breakage of mknod() in rev.1.48 of ext2_vnops.c and rev.1.126 of 2000-11-04 08:10:56 +00:00