]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:50:23 +0000 (10:50 +0200)
commitbe0a40342fb7c8080f02a8b6326229db771abce7
tree10537af9909853d61c4cf69961693de38ae1fcdc
parentc71f41fdc801929a6d5a5f8124929dd6d15df538
reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()

BugLink: https://bugs.launchpad.net/bugs/1867837
[ Upstream commit aacee5446a2a1aa35d0a49dab289552578657fb4 ]

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/reiserfs/stree.c