]> git.baikalelectronics.ru Git - kernel.git/commit
fs/ntfs3: Add check for kmemdup
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 23 Nov 2022 08:48:46 +0000 (16:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:33 +0000 (23:03 +0900)
commiteadf60ed2e9ebe069926f7675df25b73d998d09a
tree51a3228e9ce0ec209e3be51f9ceea4d2b9f8be86
parenta46b41c855285be45c63a2d267f5cded43ad5cad
fs/ntfs3: Add check for kmemdup

[ Upstream commit e6c3cef24cb0d045f99d5cb039b344874e3cfd74 ]

Since the kmemdup may return NULL pointer,
it should be better to add check for the return value
in order to avoid NULL pointer dereference.

Fixes: 271ac0299091 ("fs/ntfs3: Add NTFS journal")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/fslog.c