aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorCurt Wohlgemuth <curtw@google.com>2011-10-26 04:38:59 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-10-26 04:38:59 -0400
commit6f8ff537266ee5396c920fb0c842a21df3055ff3 (patch)
treea024979a4e8f718289e9bf36fc165b96b68d6209 /fs/ext4/inode.c
parentext4: error handling fix in ext4_ext_convert_to_initialized() (diff)
downloadlinux-dev-6f8ff537266ee5396c920fb0c842a21df3055ff3.tar.xz
linux-dev-6f8ff537266ee5396c920fb0c842a21df3055ff3.zip
ext4: handle NULL p_ext in ext4_ext_next_allocated_block()
In ext4_ext_next_allocated_block(), the path[depth] might have a p_ext that is NULL -- see ext4_ext_binsearch(). In such a case, dereferencing it will crash the machine. This patch checks for p_ext == NULL in ext4_ext_next_allocated_block() before dereferencinging it. Tested using a hand-crafted an inode with eh_entries == 0 in an extent block, verified that running FIEMAP on it crashes without this patch, works fine with it. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
0 files changed, 0 insertions, 0 deletions