Skip to contentSkip to conversation

smatch stuff: -next: null dereference in ext4_readdir()

DISCUSSION Dan Carpenter 2 participants 2 messages Jan 1, 2011 – Jan 3, 2011

lore
Share & tools
lore
#0 lore raw

Hi Ted,

There is a NULL dereference introduced in linux-next "ext4: Use ext4_error_file() to print the pathname to the corrupted inode"

fs/ext4/dir.c +170 ext4_readdir(59) error: potential null derefence 'bh'.
168 if (!bh) {
169 if (!dir_has_error) {
170 EXT4_ERROR_FILE(filp, bh->b_blocknr,
^^^^^^^^^^^^^
"bh" is null here.

   171                                                  "directory contains a "
   172                                                  "hole at offset %Lu",
   173                                             (unsigned long long) filp->f_pos);
   174                                  dir_has_error = 1;

regards,
dan carpenter

#1 lore raw
Quoted 4 lines · Dan Carpenter

Hi Ted,

There is a NULL dereference introduced in linux-next "ext4: Use ext4_error_file() to print the pathname to the corrupted inode"

Thanks for catching this! I'll fix up the bad patch in the ext4 patch tree and regen the tree.

- Ted