aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorDelyan Kratunov <[email protected]>2022-03-21 23:29:18 +0000
committerDaniel Borkmann <[email protected]>2022-03-30 14:06:59 +0200
commit522574fd7864e091d473765102e866414979b2ab (patch)
tree97879dee0c4610beb021ee2b915a844f6b23fbf9 /lib/mpi/mpiutil.c
parent77c9387c0c5bd496fba3200024e3618356b2fd34 (diff)
bpftool: Explicit errno handling in skeletons
Andrii noticed that since f97b8b9bd630 ("bpftool: Fix a bug in subskeleton code generation") the subskeleton code allows bpf_object__destroy_subskeleton to overwrite the errno that subskeleton__open would return with. While this is not currently an issue, let's make it future-proof. This patch explicitly tracks err in subskeleton__open and skeleton__create (i.e. calloc failure is explicitly ENOMEM) and ensures that errno is -err on the error return path. The skeleton code had to be changed since maps and progs codegen is shared with subskeletons. Fixes: f97b8b9bd630 ("bpftool: Fix a bug in subskeleton code generation") Signed-off-by: Delyan Kratunov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions