diff options
| author | DaeMyung Kang <charsyam@gmail.com> | 2026-05-24 08:42:37 +0300 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-06-05 18:20:10 +0300 |
| commit | 8488c4d066e6a52937fa5d82ab131c7554ddc9d8 (patch) | |
| tree | 4990e2cde3163546295c784332bd30ec466c9021 /include/linux/timerqueue.h | |
| parent | 3964169d68ed282ccf0f7aac80f6606723280e04 (diff) | |
| download | linux-8488c4d066e6a52937fa5d82ab131c7554ddc9d8.tar.xz | |
ntfs: free link name from ntfs_name_cache
ntfs_link() converts the new link name with ntfs_nlstoucs() using
NTFS_MAX_NAME_LEN. In this case ntfs_nlstoucs() allocates the result
from ntfs_name_cache, and its contract requires callers to release the
buffer with kmem_cache_free(ntfs_name_cache, ...).
All other ntfs_nlstoucs() callers in namei.c do that, but ntfs_link()
uses kfree(), which mismatches the allocator for successfully converted
names.
The conversion failure path reaches the common out label with uname ==
NULL. That was harmless for kfree(), but kmem_cache_free() does not
provide the same NULL contract. Return directly on conversion failure
and free successful conversions with ntfs_name_cache.
Fixes: af0db57d4293 ("ntfs: update inode operations")
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
