diff options
| author | Kees Cook <kees+treewide@kernel.org> | 2026-09-17 14:11:59 -0700 |
|---|---|---|
| committer | Dominique Martinet <asmadeus@codewreck.org> | 2026-09-22 08:10:38 +0000 |
| commit | a869fe526caa175924863ea570ac4bb40ccbb1ac (patch) | |
| tree | 2820e4df76d5e4756d6ca7ce94f720c150b07018 /scripts/basic | |
| parent | 7b6f2e3c29fb4d76f1e4973280792eabbd526602 (diff) | |
| download | linux-a869fe526caa175924863ea570ac4bb40ccbb1ac.tar.gz linux-a869fe526caa175924863ea570ac4bb40ccbb1ac.zip | |
9p: Add const and unsigned to wnames allocation type
In preparation for converting the kmalloc family of allocators to the
type-aware kmalloc_obj family, we need to make sure that the returned
type from the allocation matches the type of the variable being
assigned. (The kmalloc family returns "void *", which can be implicitly
cast to any pointer type.)
The assigned type is "const unsigned char **", but the converted
allocation type would be "char **", which differs in both the const
qualifier and the signedness of the character type. Take the size from
the assignment target instead. No change in allocation size results.
Build tested ARCH=x86_64 allmodconfig with GCC 16.2.0:
fs/9p/fid.o
Assisted-by: LLM coccinelle
Signed-off-by: Kees Cook <kees+treewide@kernel.org>
Message-ID: <20260917211158.i.129-kees@kernel.org>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
