diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2020-12-15 10:48:07 +0100 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2020-12-15 10:48:07 +0100 | 
| commit | 3c41e57a1e168d879e923c5583adeae47eec9f64 (patch) | |
| tree | e6272012c4b766189be2821316a3d23d115f5195 /tools/bpf | |
| parent | d14ce74f1fb376ccbbc0b05ded477ada51253729 (diff) | |
| parent | 2f5fbc4305d07725bfebaedb09e57271315691ef (diff) | |
Merge tag 'irqchip-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates for 5.11 from Marc Zyngier:
  - Preliminary support for managed interrupts on platform devices
  - Correctly identify allocation of MSIs proxyied by another device
  - Remove the fasteoi IPI flow which has been proved useless
  - Generalise the Ocelot support to new SoCs
  - Improve GICv4.1 vcpu entry, matching the corresponding KVM optimisation
  - Work around spurious interrupts on Qualcomm PDC
  - Random fixes and cleanups
Link: https://lore.kernel.org/r/20201212135626.1479884-1-maz@kernel.org
Diffstat (limited to 'tools/bpf')
| -rw-r--r-- | tools/bpf/bpftool/feature.c | 7 | ||||
| -rw-r--r-- | tools/bpf/bpftool/net.c | 18 | ||||
| -rw-r--r-- | tools/bpf/bpftool/prog.c | 2 | ||||
| -rw-r--r-- | tools/bpf/bpftool/skeleton/profiler.bpf.c | 4 | 
4 files changed, 18 insertions, 13 deletions
| diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c index a43a6f10b564..359960a8f1de 100644 --- a/tools/bpf/bpftool/feature.c +++ b/tools/bpf/bpftool/feature.c @@ -843,9 +843,14 @@ static int handle_perms(void)  		else  			p_err("missing %s%s%s%s%s%s%s%srequired for full feature probing; run as root or use 'unprivileged'",  			      capability_msg(bpf_caps, 0), +#ifdef CAP_BPF  			      capability_msg(bpf_caps, 1),  			      capability_msg(bpf_caps, 2), -			      capability_msg(bpf_caps, 3)); +			      capability_msg(bpf_caps, 3) +#else +				"", "", "", "", "", "" +#endif /* CAP_BPF */ +				);  		goto exit_free;  	} diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c index 910e7bac6e9e..3fae61ef6339 100644 --- a/tools/bpf/bpftool/net.c +++ b/tools/bpf/bpftool/net.c @@ -578,8 +578,8 @@ static int do_attach(int argc, char **argv)  	ifindex = net_parse_dev(&argc, &argv);  	if (ifindex < 1) { -		close(progfd); -		return -EINVAL; +		err = -EINVAL; +		goto cleanup;  	}  	if (argc) { @@ -587,8 +587,8 @@ static int do_attach(int argc, char **argv)  			overwrite = true;  		} else {  			p_err("expected 'overwrite', got: '%s'?", *argv); -			close(progfd); -			return -EINVAL; +			err = -EINVAL; +			goto cleanup;  		}  	} @@ -596,17 +596,17 @@ static int do_attach(int argc, char **argv)  	if (is_prefix("xdp", attach_type_strings[attach_type]))  		err = do_attach_detach_xdp(progfd, attach_type, ifindex,  					   overwrite); - -	if (err < 0) { +	if (err) {  		p_err("interface %s attach failed: %s",  		      attach_type_strings[attach_type], strerror(-err)); -		return err; +		goto cleanup;  	}  	if (json_output)  		jsonw_null(json_wtr); - -	return 0; +cleanup: +	close(progfd); +	return err;  }  static int do_detach(int argc, char **argv) diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index d942c1e3372c..acdb2c245f0a 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -940,7 +940,7 @@ static int parse_attach_detach_args(int argc, char **argv, int *progfd,  	}  	if (*attach_type == BPF_FLOW_DISSECTOR) { -		*mapfd = -1; +		*mapfd = 0;  		return 0;  	} diff --git a/tools/bpf/bpftool/skeleton/profiler.bpf.c b/tools/bpf/bpftool/skeleton/profiler.bpf.c index 4e3512f700c0..ce5b65e07ab1 100644 --- a/tools/bpf/bpftool/skeleton/profiler.bpf.c +++ b/tools/bpf/bpftool/skeleton/profiler.bpf.c @@ -70,7 +70,7 @@ int BPF_PROG(fentry_XXX)  static inline void  fexit_update_maps(u32 id, struct bpf_perf_event_value *after)  { -	struct bpf_perf_event_value *before, diff, *accum; +	struct bpf_perf_event_value *before, diff;  	before = bpf_map_lookup_elem(&fentry_readings, &id);  	/* only account samples with a valid fentry_reading */ @@ -95,7 +95,7 @@ int BPF_PROG(fexit_XXX)  {  	struct bpf_perf_event_value readings[MAX_NUM_MATRICS];  	u32 cpu = bpf_get_smp_processor_id(); -	u32 i, one = 1, zero = 0; +	u32 i, zero = 0;  	int err;  	u64 *count; | 
