deepin-kernel/fs/ntfs3
Andrey Vatoropin e391d3aa23 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: 82cae269cf ("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>
(cherry picked from commit 701340a25b1ad210e6b8192195be21fd3fcc22c7)
2025-06-20 14:38:52 +08:00
..
lib fs/ntfs3: Add missing header and guards to lib/ headers 2021-09-13 19:41:44 +03:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
attrib.c fs/ntfs3: Fix warning in ni_fiemap 2025-01-13 11:06:44 +08:00
attrlist.c fs/ntfs3: Use kvfree to free memory allocated by kvmalloc 2024-03-01 13:34:54 +01:00
bitfunc.c fs/ntfs3: Add ntfs_bitmap_weight_le function and refactoring 2022-11-14 19:50:42 +03:00
bitmap.c fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64() 2024-12-10 20:40:40 +08:00
debug.h fs/ntfs3. Add forward declarations for structs to debug.h 2021-09-13 19:41:43 +03:00
dir.c fs/ntfs3: Check more cases when directory is corrupted 2024-12-10 20:41:25 +08:00
file.c fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size 2025-05-09 23:02:44 +08:00
frecord.c fs/ntfs3: Fix warning in ni_fiemap 2025-01-13 11:06:44 +08:00
fslog.c fs/ntfs3: Refactor enum_rstbl to suppress static checker 2024-12-10 20:42:41 +08:00
fsntfs.c fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64() 2024-12-10 20:40:40 +08:00
index.c fs/ntfs3: handle hdr_first_de() return value 2025-06-20 14:38:52 +08:00
inode.c fs/ntfs3: Implement fallocate for compressed files 2025-01-13 11:06:44 +08:00
lznt.c fs/ntfs3: Check if more than chunk-size bytes are written 2024-12-10 20:43:31 +08:00
namei.c fs/ntfs3: Fix possible deadlock in mi_read 2024-12-10 20:43:31 +08:00
ntfs.h fs/ntfs3: Prevent integer overflow in hdr_first_de() 2025-04-14 15:49:20 +08:00
ntfs_fs.h fs/ntfs3: Fix warning in ni_fiemap 2025-01-13 11:06:44 +08:00
record.c fs/ntfs3: Sequential field availability check in mi_enum_attr() 2024-12-10 20:43:37 +08:00
run.c fs/ntfs3: Fix case when unmarked clusters intersect with zone 2024-12-16 00:22:41 +08:00
super.c fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64() 2024-12-10 20:40:40 +08:00
upcase.c fs/ntfs3: Add option "nocase" 2022-09-30 17:39:47 +03:00
xattr.c fs/ntfs3: Mark volume as dirty if xattr is broken 2024-12-10 20:39:05 +08:00