Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: don't dereference null pointer when make_indexed_dir() fails

Fix for a null pointer bug found while running punch hole tests

Signed-off-by: Allison Henderson <achender@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

authored by

Allison Henderson and committed by
Theodore Ts'o
6976a6f2 44183d42

+4 -2
+4 -2
fs/ext4/namei.c
··· 1413 1413 frame->at = entries; 1414 1414 frame->bh = bh; 1415 1415 bh = bh2; 1416 + 1417 + ext4_handle_dirty_metadata(handle, dir, frame->bh); 1418 + ext4_handle_dirty_metadata(handle, dir, bh); 1419 + 1416 1420 de = do_split(handle,dir, &bh, frame, &hinfo, &retval); 1417 1421 if (!de) { 1418 1422 /* ··· 1425 1421 * with corrupted filesystem. 1426 1422 */ 1427 1423 ext4_mark_inode_dirty(handle, dir); 1428 - ext4_handle_dirty_metadata(handle, dir, frame->bh); 1429 - ext4_handle_dirty_metadata(handle, dir, bh); 1430 1424 dx_release(frames); 1431 1425 return retval; 1432 1426 }