summaryrefslogtreecommitdiff
path: root/include/linux/bpf_mem_alloc.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2023-03-24 11:42:41 -0700
committerAlexei Starovoitov <ast@kernel.org>2023-03-24 12:40:47 -0700
commit55fbae05476df65e5eee8be54f61d0257af0240b (patch)
tree32a0ed63009db5289dd0d5082e0b27c8440170a4 /include/linux/bpf_mem_alloc.h
parent226bc6ae6405c46a6e9865835c36a1d45fc0b3bf (diff)
downloadlinux-55fbae05476df65e5eee8be54f61d0257af0240b.tar.gz
linux-55fbae05476df65e5eee8be54f61d0257af0240b.tar.bz2
linux-55fbae05476df65e5eee8be54f61d0257af0240b.zip
bpf: Check IS_ERR for the bpf_map_get() return value
This patch fixes a mistake in checking NULL instead of checking IS_ERR for the bpf_map_get() return value. It also fixes the return value in link_update_map() from -EINVAL to PTR_ERR(*_map). Reported-by: syzbot+71ccc0fe37abb458406b@syzkaller.appspotmail.com Fixes: 68b04864ca42 ("bpf: Create links for BPF struct_ops maps.") Fixes: aef56f2e918b ("bpf: Update the struct_ops of a bpf_link.") Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Acked-by: Kui-Feng Lee <kuifeng@meta.com> Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/20230324184241.1387437-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/bpf_mem_alloc.h')
0 files changed, 0 insertions, 0 deletions