]> git.baikalelectronics.ru Git - 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)
commite5fa54f0cd8ca0b8ff0dec430b435c4086f3082b
tree0843535343ed67d8743ad0df18e895d77f801209
parentab490989a53a9a737fdbddf71f650f23f9a2d152
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