diff options
| author | Kumar Kartikeya Dwivedi <[email protected]> | 2022-11-20 21:26:10 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-11-20 23:38:28 +0000 |
| commit | e181d3f143f7957a73c8365829249d8084602606 (patch) | |
| tree | 0fed469c8031cfc1b2b14489c804b901f204eb0e /tools/bpf/bpftool/prog.c | |
| parent | Merge branch 'Support storing struct task_struct objects as kptrs' (diff) | |
| download | kernel-e181d3f143f7957a73c8365829249d8084602606.tar.gz kernel-e181d3f143f7957a73c8365829249d8084602606.zip | |
bpf: Disallow bpf_obj_new_impl call when bpf_mem_alloc_init fails
In the unlikely event that bpf_global_ma is not correctly initialized,
instead of checking the boolean everytime bpf_obj_new_impl is called,
simply check it while loading the program and return an error if
bpf_global_ma_set is false.
Suggested-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions
