aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2022-08-10 18:34:25 +0000
committerAlexei Starovoitov <[email protected]>2022-08-10 18:47:29 +0000
commitd7c5802faff6e7f50d18db40fdcb7e50590177f5 (patch)
tree53a459f9da5f0444d3d5260e273c62285c1efff3 /tools/lib/bpf/bpf.c
parentMerge branch 'destructive bpf_kfuncs' (diff)
downloadkernel-d7c5802faff6e7f50d18db40fdcb7e50590177f5.tar.gz
kernel-d7c5802faff6e7f50d18db40fdcb7e50590177f5.zip
libbpf: preserve errno across pr_warn/pr_info/pr_debug
As suggested in [0], make sure that libbpf_print saves and restored errno and as such guaranteed that no matter what actual print callback user installs, macros like pr_warn/pr_info/pr_debug are completely transparent as far as errno goes. While libbpf code is pretty careful about not clobbering important errno values accidentally with pr_warn(), it's a trivial change to make sure that pr_warn can be used anywhere without a risk of clobbering errno. No functional changes, just future proofing. [0] https://github.com/libbpf/libbpf/pull/536 Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Daniel Müller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/lib/bpf/bpf.c')
0 files changed, 0 insertions, 0 deletions