Commit a56f1f45 authored by Yunfeng Ye's avatar Yunfeng Ye Committed by Greg Kroah-Hartman

reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()

[ Upstream commit aacee544 ]

The variable inode may be NULL in reiserfs_insert_item(), but there is
no check before accessing the member of inode.

Fix this by adding NULL pointer check before calling reiserfs_debug().

Link:[email protected]Signed-off-by: default avatarYunfeng Ye <[email protected]>
Cc: zhengbin <[email protected]>
Cc: Hu Shiyuan <[email protected]>
Cc: Feilong Lin <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: default avatarAndrew Morton <[email protected]>
Signed-off-by: default avatarLinus Torvalds <[email protected]>
Signed-off-by: default avatarSasha Levin <[email protected]>
parent d11dbc09
......@@ -2246,7 +2246,8 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
/* also releases the path */
reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
if (inode)
reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
"reiserquota insert_item(): freeing %u id=%u type=%c",
quota_bytes, inode->i_uid, head2type(ih));
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment