]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] ext3: avoid triggering ext3_error on bad NFS file handle
authorNeil Brown <neilb@suse.de>
Sun, 30 Jul 2006 10:03:01 +0000 (03:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Jul 2006 20:28:36 +0000 (13:28 -0700)
commit2ccb48ebb4de139eef4fcefd5f2bb823cb0d81b9
treee06a83c7306e143175a87df2328b45e1ef34da5b
parentf712c0c7e1796f92e45e4de144e247816d974b8f
[PATCH] ext3: avoid triggering ext3_error on bad NFS file handle

The inode number out of an NFS file handle gets passed eventually to
ext3_get_inode_block() without any checking.  If ext3_get_inode_block()
allows it to trigger an error, then bad filehandles can have unpleasant
effect - ext3_error() will usually cause a forced read-only remount, or a
panic if `errors=panic' was used.

So remove the call to ext3_error there and put a matching check in
ext3/namei.c where inode numbers are read off storage.

[akpm@osdl.org: fix off-by-one error]
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: <stable@kernel.org>
Cc: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/ext3/inode.c
fs/ext3/namei.c
include/linux/ext3_fs.h