]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ubifs: skip dumping tnc tree when zroot is null
authorpangliyuan <pangliyuan1@huawei.com>
Tue, 24 Dec 2024 08:18:23 +0000 (16:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:08 +0000 (10:02 +0100)
commit2a987950df825d0144370e700dc5fb337684ffba
tree394b249cf2f867bf14c30199f1aff3f55ff628ff
parentcfc85738da7fd4598393387182783ff0cd090b69
ubifs: skip dumping tnc tree when zroot is null

[ Upstream commit bdb0ca39e0acccf6771db49c3f94ed787d05f2d7 ]

Clearing slab cache will free all znode in memory and make
c->zroot.znode = NULL, then dumping tnc tree will access
c->zroot.znode which cause null pointer dereference.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=219624#c0
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: pangliyuan <pangliyuan1@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ubifs/debug.c