diff --git a/userspace/libscap/engine/bpf/scap_bpf.c b/userspace/libscap/engine/bpf/scap_bpf.c index 32d45c733..077dd707b 100644 --- a/userspace/libscap/engine/bpf/scap_bpf.c +++ b/userspace/libscap/engine/bpf/scap_bpf.c @@ -122,7 +122,14 @@ static const char *g_filler_names[PPM_FILLER_MAX] = { static int sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr, unsigned int size) { - return syscall(__NR_bpf, cmd, attr, size); + + for (int i = 0; i < 10; i++) { + int err = syscall(__NR_bpf, cmd, attr, size); + if (err) break; + } + + return err; + } static int sys_perf_event_open(struct perf_event_attr *attr,