mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()
[ Upstream commit aacee5446a
]
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: http://lkml.kernel.org/r/79c5135d-ff25-1cc9-4e99-9f572b88cc00@huawei.com
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Cc: zhengbin <zhengbin13@huawei.com>
Cc: Hu Shiyuan <hushiyuan@huawei.com>
Cc: Feilong Lin <linfeilong@huawei.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
55f09a4b9d
commit
8f75e38483
1 changed files with 2 additions and 1 deletions
|
@ -2250,6 +2250,7 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
|
|||
/* also releases the path */
|
||||
unfix_nodes(&s_ins_balance);
|
||||
#ifdef REISERQUOTA_DEBUG
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue