]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix potential NULL dereference in ext4_free_inodes_counts()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 28 May 2012 18:16:57 +0000 (14:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 28 May 2012 18:16:57 +0000 (14:16 -0400)
commite348f8cfad646c5d7454d92b741dd0460d54430c
treec88fbbdb6464bfa35c047b207dd6097f3b447375
parent1134fb54effdf7b684e70f0c1249b3fe5b78bd67
ext4: fix potential NULL dereference in ext4_free_inodes_counts()

The ext4_get_group_desc() function returns NULL on error, and
ext4_free_inodes_count() function dereferences it without checking.
There is a check on the next line, but it's too late.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/ialloc.c