]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/ntfs3: handle hdr_first_de() return value
authorAndrey Vatoropin <a.vatoropin@crpt.ru>
Tue, 18 Mar 2025 13:42:18 +0000 (13:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:11 +0000 (11:05 +0100)
commit5390b3d4c6d41d05bb9149d094d504cbc9ea85bf
tree84a88794757cb671d93513381657a231a5641870
parent892a242ca5b1f2530388d568998a685fae90b625
fs/ntfs3: handle hdr_first_de() return value

[ Upstream commit af5cab0e5b6f8edb0be51a9f47f3f620e0b4fd70 ]

The hdr_first_de() function returns a pointer to a struct NTFS_DE. This
pointer may be NULL. To handle the NULL error effectively, it is important
to implement an error handler. This will help manage potential errors
consistently.

Additionally, error handling for the return value already exists at other
points where this function is called.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/index.c