This is a note to let you know that I've just added the patch titled bpf: Suppress 'passing zero to PTR_ERR' warning to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bpf-suppress-passing-zero-to-ptr_err-warning.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 1ec5ee8c8a5a65ea377f8bea64bf4d5b743f6f79 Mon Sep 17 00:00:00 2001 From: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> Date: Sat, 21 May 2022 18:56:20 +0530 Subject: bpf: Suppress 'passing zero to PTR_ERR' warning From: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> commit 1ec5ee8c8a5a65ea377f8bea64bf4d5b743f6f79 upstream. Kernel Test Robot complains about passing zero to PTR_ERR for the said line, suppress it by using PTR_ERR_OR_ZERO. Fixes: c0a5a21c25f3 ("bpf: Allow storing referenced kptr in map") Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx> Link: https://lore.kernel.org/bpf/20220521132620.1976921-1-memxor@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -5327,7 +5327,7 @@ static int process_kptr_func(struct bpf_ 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); Patches currently in stable-queue which might be from memxor@xxxxxxxxx are queue-5.18/bpf-allow-storing-referenced-kptr-in-map.patch queue-5.18/bpf-move-check_ptr_off_reg-before-check_map_access.patch queue-5.18/bpf-tag-argument-to-be-released-in-bpf_func_proto.patch queue-5.18/bpf-adapt-copy_map_value-for-multiple-offset-case.patch queue-5.18/bpf-wire-up-freeing-of-referenced-kptr.patch queue-5.18/bpf-fix-sparse-warning-for-bpf_kptr_xchg_proto.patch queue-5.18/bpf-populate-pairs-of-btf_id-and-destructor-kfunc-in.patch queue-5.18/bpf-suppress-passing-zero-to-ptr_err-warning.patch queue-5.18/bpf-allow-storing-unreferenced-kptr-in-map.patch queue-5.18/bpf-make-btf_find_field-more-generic.patch