The patch titled ext2 reject file handles with bad inode numbers early has been added to the -mm tree. Its filename is ext2-reject-file-handles-with-bad-inode-numbers-early.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ext2 reject file handles with bad inode numbers early From: Neil Brown <neilb@xxxxxxx> Prevent bad inode numbers from triggering errors in ext2_get_inode(). Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ext2/super.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff -puN fs/ext2/super.c~ext2-reject-file-handles-with-bad-inode-numbers-early fs/ext2/super.c --- a/fs/ext2/super.c~ext2-reject-file-handles-with-bad-inode-numbers-early +++ a/fs/ext2/super.c @@ -251,6 +251,20 @@ static struct super_operations ext2_sops #endif }; +static struct dentry *ext2_get_dentry(struct super_block *sb, void *vobjp) +{ + __u32 *objp = vobjp; + unsigned long ino = objp[0]; + __u32 generation = objp[1]; + + if (ino != EXT2_ROOT_INO && ino < EXT2_FIRST_INO(sb)) + return ERR_PTR(-ESTALE); + if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count)) + return ERR_PTR(-ESTALE); + + return export_iget(sb, ino, generation); +} + /* Yes, most of these are left as NULL!! * A NULL value implies the default, which works with ext2-like file * systems, but can be improved upon. @@ -258,6 +272,7 @@ static struct super_operations ext2_sops */ static struct export_operations ext2_export_ops = { .get_parent = ext2_get_parent, + .get_dentry = ext2_get_dentry, }; static unsigned long get_sb_block(void **data) _ Patches currently in -mm which might be from neilb@xxxxxxx are ext3-avoid-triggering-ext3_error-on-bad-nfs-file-handle.patch ext3-avoid-triggering-ext3_error-on-bad-nfs-file-handle-fix.patch git-klibc.patch ext3-reject-filehandles-referring-to-special-files.patch ext2-reject-file-handles-with-bad-inode-numbers-early.patch md-dm-reduce-stack-usage-with-stacked-block-devices.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html