bpf: Suppress 'passing zero to PTR_ERR' warning
Kumar Kartikeya Dwivedi
maintainerPATCH 1/1 bpf: Suppress 'passing zero to PTR_ERR' warning
Kernel Test Robot complains about passing zero to PTR_ERR for the said line, suppress it by using PTR_ERR_OR_ZERO.
Reported-by kernel test robot <[email protected]>
Signed-off-by Kumar Kartikeya Dwivedi <[email protected]>
--- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/verifier.c +1 -1
@@ -5352,7 +5352,7 @@ static int process_kptr_func(struct bpf_verifier_env *env, int regno,return -EINVAL ; }if (!map_value_has_kptrs (map_ptr)) { - ret =PTR_ERR (map_ptr->kptr_off_tab); + ret =PTR_ERR_OR_ZERO (map_ptr->kptr_off_tab);if (ret == -E2BIG )verbose (env,"map '%s' has more than %d kptr\n" , map_ptr->name,BPF_MAP_VALUE_OFF_MAX );
--
2.36.1
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Quoted 10 lines · On Sat, 21 May 2022 18:56:20 +0530 you wrote:
Kernel Test Robot complains about passing zero to
PTR_ERRfor the said line, suppress it by usingPTR_ERR_OR_ZERO.Reported-by kernel test robot <[email protected]>Signed-off-by Kumar Kartikeya Dwivedi <[email protected]>--- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)[...]
Here is the summary with links:
- [bpf-next] bpf: Suppress 'passing zero to PTR_ERR' warning
https://git.kernel.org/bpf/bpf-next/c/1ec5ee8c8a5a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html