ext4: Fix softlockup caused by illegal i_file_acl value in on-disk inode
authorTheodore Ts'o <tytso@mit.edu>
Tue, 2 Jun 2009 12:09:31 +0000 (08:09 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Jun 2009 03:01:56 +0000 (20:01 -0700)
commita7477120f9da23c4ee1ba66af7eb5e931d5061ad
tree7ea5d1e01361c04256ae0872ce6a031fcf3b9339
parentd797fe6ff1a3db2f6d69835c090e820424fcbddb
ext4: Fix softlockup caused by illegal i_file_acl value in on-disk inode

(cherry picked from commit 485c26ec70f823f2a9cf45982b724893e53a859e)

If the block containing external extended attributes (which is stored
in i_file_acl and i_file_acl_high) is larger than the on-disk
filesystem, the process which tried to access the extended attributes
will endlessly issue kernel printks complaining that
"__find_get_block_slow() failed", locking up that CPU until the system
is forcibly rebooted.

So when we read in the inode, make sure the i_file_acl value is legal,
and if not, flag the filesystem as being corrupted.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/inode.c