diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2026-03-04 09:38:32 +0100 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-03-04 19:37:13 +0900 |
| commit | f462fdf3d6a405ada5cf51241d56a47ead152968 (patch) | |
| tree | 27986008bae97341287b0d164140eaa13f982fd2 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | a8fde8be9aa8e5f10ef73b59b2ad4fba585ccdc5 (diff) | |
ntfs: reduce stack usage in ntfs_write_mft_block()
The use of two large arrays in this function makes the stack frame exceed
the warning limit in some configurations, especially with KASAN enabled.
When CONFIG_PAGE_SIZE is set to 65536, each of the arrays contains 128
pointers, so the combined size is 2KB:
fs/ntfs/mft.c: In function 'ntfs_write_mft_block.isra':
fs/ntfs/mft.c:2891:1: error: the frame size of 2640 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
Use dynamic allocation of these arrays to avoid getting into dangerously
high stack usage.
Unfortunately, allocating memory in the writepages() code path can be
problematic in case of low memory situations, so it would be better to
rework the code more widely to avoid the allocation entirely.
Fixes: 115380f9a2f9 ("ntfs: update mft operations")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
