diff options
author | Stanislav Fomichev <sdf@google.com> | 2020-12-03 00:13:32 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2020-12-03 21:01:18 +0100 |
commit | d6d418bd8f92aaa4c7c26d606188147c2ee0dae9 (patch) | |
tree | ed992bd637cd557b9fa76b204ef4a9ac01a6e7b6 /net/phonet | |
parent | libbpf: Sanitise map names before pinning (diff) | |
download | linux-d6d418bd8f92aaa4c7c26d606188147c2ee0dae9.tar.xz linux-d6d418bd8f92aaa4c7c26d606188147c2ee0dae9.zip |
libbpf: Cap retries in sys_bpf_prog_load
I've seen a situation, where a process that's under pprof constantly
generates SIGPROF which prevents program loading indefinitely.
The right thing to do probably is to disable signals in the upper
layers while loading, but it still would be nice to get some error from
libbpf instead of an endless loop.
Let's add some small retry limit to the program loading:
try loading the program 5 (arbitrary) times and give up.
v2:
* 10 -> 5 retires (Andrii Nakryiko)
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201202231332.3923644-1-sdf@google.com
Diffstat (limited to 'net/phonet')
0 files changed, 0 insertions, 0 deletions