OSDN Git Service

bpf: Fix bpf_dynptr_slice{_rdwr} to return NULL instead of 0
authorJoanne Koong <joannelkoong@gmail.com>
Thu, 2 Mar 2023 05:30:14 +0000 (21:30 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 2 Mar 2023 05:36:29 +0000 (21:36 -0800)
commitc45eac537bd8b4977d335c123212140bc5257670
treed56603cad89656191553a849b51036c7801720ea
parentb1d462bc30e70d89e7b729391d7585443f2910c8
bpf: Fix bpf_dynptr_slice{_rdwr} to return NULL instead of 0

Change bpf_dynptr_slice and bpf_dynptr_slice_rdwr to return NULL instead
of 0, in accordance with the codebase guidelines.

Fixes: 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230302053014.1726219-1-joannelkoong@gmail.com
kernel/bpf/helpers.c