* [PATCH bpf-next] bpf: Suppress 'passing zero to PTR_ERR' warning
@ 2022-05-21 13:26 Kumar Kartikeya Dwivedi
2022-05-23 21:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2022-05-21 13:26 UTC (permalink / raw)
To: bpf
Cc: kernel test robot, Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann
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 <lkp@intel.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
kernel/bpf/verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 14e8c17d3d8d..45153cbc2bd6 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf: Suppress 'passing zero to PTR_ERR' warning
2022-05-21 13:26 [PATCH bpf-next] bpf: Suppress 'passing zero to PTR_ERR' warning Kumar Kartikeya Dwivedi
@ 2022-05-23 21:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-23 21:20 UTC (permalink / raw)
To: Kumar Kartikeya Dwivedi; +Cc: bpf, lkp, ast, andrii, daniel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Sat, 21 May 2022 18:56:20 +0530 you wrote:
> 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 <lkp@intel.com>
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-23 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-21 13:26 [PATCH bpf-next] bpf: Suppress 'passing zero to PTR_ERR' warning Kumar Kartikeya Dwivedi
2022-05-23 21:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).