OSDN Git Service

bpf: Avoid warning when re-casting __bpf_call_base into __bpf_call_base_args
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Jan 2021 07:55:15 +0000 (23:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 08:39:33 +0000 (09:39 +0100)
commit6d7fdbb979fa84cd63c3efb3c49ff7101774da73
treeb439e8117ed3064e987f769a1baf833f8c7c9ad1
parent758a4da553576b9de88e4751be7a484568c9d0af
bpf: Avoid warning when re-casting __bpf_call_base into __bpf_call_base_args

[ Upstream commit 6943c2b05bf09fd5c5729f7d7d803bf3f126cb9a ]

BPF interpreter uses extra input argument, so re-casts __bpf_call_base into
__bpf_call_base_args. Avoid compiler warning about incompatible function
prototypes by casting to void * first.

Fixes: 1ea47e01ad6e ("bpf: add support for bpf_call to interpreter")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210112075520.4103414-3-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/filter.h