From owner-cvs-all Sat Nov 4 0:11: 1 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4968F37B4C5; Sat, 4 Nov 2000 00:10:57 -0800 (PST) Received: (from bde@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id AAA59313; Sat, 4 Nov 2000 00:10:57 -0800 (PST) (envelope-from bde@FreeBSD.org) Message-Id: <200011040810.AAA59313@freefall.freebsd.org> From: Bruce Evans Date: Sat, 4 Nov 2000 00:10:57 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/gnu/ext2fs ext2_vnops.c src/sys/ufs/ufs ufs_vnops.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG bde 2000/11/04 00:10:57 PST Modified files: sys/gnu/ext2fs ext2_vnops.c sys/ufs/ufs ufs_vnops.c Log: 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. Revision Changes Path 1.55 +4 -2 src/sys/gnu/ext2fs/ext2_vnops.c 1.154 +4 -2 src/sys/ufs/ufs/ufs_vnops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message