]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
libbpf: Fix probe code to return EPERM if encountered
authorEelco Chaudron <echaudro@redhat.com>
Tue, 12 May 2020 09:04:40 +0000 (11:04 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 13 May 2020 08:29:54 +0000 (10:29 +0200)
commitfd9eef1a132d1974405c3ebf9d5688ec5c51da94
tree0843535343ed67d8743ad0df18e895d77f801209
parent309b81f0fdc4209d998bc63f0da52c2e96340d4e
libbpf: Fix probe code to return EPERM if encountered

When the probe code was failing for any reason ENOTSUP was returned, even
if this was due to not having enough lock space. This patch fixes this by
returning EPERM to the user application, so it can respond and increase
the RLIMIT_MEMLOCK size.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/158927424896.2342.10402475603585742943.stgit@ebuild
tools/lib/bpf/libbpf.c