Commit bfa2bb9a authored by Kumar Kartikeya Dwivedi's avatar Kumar Kartikeya Dwivedi Committed by Alexei Starovoitov
Browse files

bpf: Fix improper int-to-ptr cast in dump_stack_cb



On 32-bit platforms, we'll try to convert a u64 directly to a pointer
type which is 32-bit, which causes the compiler to complain about cast
from an integer of a different size to a pointer type. Cast to long
before casting to the pointer type to match the pointer width.

Reported-by: default avatarkernelci.org bot <bot@kernelci.org>
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Fixes: d7c431ca ("bpf: Add dump_stack() analogue to print to BPF stderr")
Signed-off-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20250705053035.3020320-3-memxor@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 116c8f47
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment