static __noinline int cb1(void *map, void *key, void *value, void *ctx)
{ void *p = *(void **)ctx;
bpf_kfunc_call_test_release(p); /* Without the fix this would cause underflow */ return 0;
}
bpf_kfunc_call_test_acquire(&sl);
bpf_for_each_map_elem(&array_map, cb, &p, 0); /* It should only complain here, not in cb. This is why we need * callback_ref to be set to frameno.
*/ return 0;
}
SEC("?tc") int nested_cb(void *ctx)
{ struct prog_test_ref_kfunc *p; unsignedlong sl = 0; int sp = 0;
p = bpf_kfunc_call_test_acquire(&sl); if (!p) return 0;
bpf_for_each_map_elem(&array_map, cb3, &sp, 0);
bpf_kfunc_call_test_release(p); return 0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.