]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
authorJan Kara <jack@suse.cz>
Tue, 6 Jan 2009 19:53:35 +0000 (14:53 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 6 Jan 2009 19:53:35 +0000 (14:53 -0500)
commit4b905671d2ea09fd48fed72c581df17e40823f39
tree62fcc9de092b2161b449f9205d516cba2e82b0b7
parent83982b6f47201c4c7767210d24d7d8c99567a0b3
jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs

On 32-bit system with CONFIG_LBD getblk can fail because provided
block number is too big.  Add error checks so we fail gracefully if
getblk() returns NULL (which can also happen on memory allocation
failures).

Thanks to David Maciejak from Fortinet's FortiGuard Global Security
Research Team for reporting this bug.

http://bugzilla.kernel.org/show_bug.cgi?id=12370

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
cc: stable@kernel.org
fs/jbd2/journal.c