]> git.baikalelectronics.ru Git - kernel.git/commit
reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()
authorYunfeng Ye <yeyunfeng@huawei.com>
Fri, 31 Jan 2020 06:17:26 +0000 (22:17 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2020 18:30:41 +0000 (10:30 -0800)
commit0c907cd09617887906eebdc56810d0f08403607f
treeba28a9321a427dc2be27b549bbf99f930d4a9018
parenteaba8b4fe83cacc9d20960b68f8083983ccae5be
reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()

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>
fs/reiserfs/stree.c