kern/142924: Small cleanup for the inode struct in ext2fs (based on UFS)

Pedro F. Giffuni giffunip at tutopia.com
Thu Jan 28 18:22:27 UTC 2010


Include two more simple patches from ufs_lookup.c:

CVS 1.54:
When compacting directories, ufs_direnter() always trusted DIRSIZ()
to supply the number of bytes to be bcopy()'d to move an entry. If
d_ino == 0 however, DIRSIZ() is not guaranteed to return a sensible
length, so ufs_direnter could end up corrupting a directory during
compaction.

CVS 1.45:
Extend the sanity checks in ufs_lookup to ensure that each directory
entry fits within its DIRBLKSIZ block.
_______

These were meant to fix issues found with dirhash on UFS but ext2fs
still works here with those changes so I think it's good to have
them, JIC we end up bringing over dirhash to ext2fs.


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-ext2fs
Type: application/octet-stream
Size: 4225 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bugs/attachments/20100128/e2f8c8c7/patch-ext2fs.obj


More information about the freebsd-bugs mailing list