Commit bf40c926 authored by Namjae Jeon's avatar Namjae Jeon Committed by Theodore Ts'o
Browse files

ext4: fix potential null pointer dereference in ext4_free_inode

Fix potential null pointer dereferencing problem caused by e43bb4e6

("ext4: decrement free clusters/inodes counters when block group declared bad")
Reported-by: default avatarDan Carpenter <>
Signed-off-by: default avatarNamjae Jeon <>
Signed-off-by: default avatarAshish Sangwan <>
Signed-off-by: default avatarTheodore Ts'o <>
Reviewed-by: default avatarLukas Czerner <>
parent 3f1f9b85
......@@ -338,7 +338,7 @@ out:
fatal = err;
} else {
ext4_error(sb, "bit already cleared for inode %lu", ino);
if (gdp && !EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {
int count;
count = ext4_free_inodes_count(sb, gdp);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment