All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf bpf-loader: Add missing '*' for key_scan_pos
@ 2020-05-20  3:32 ` Wang ShaoBo
  0 siblings, 0 replies; 7+ messages in thread
From: Wang ShaoBo @ 2020-05-20  3:32 UTC (permalink / raw)
  Cc: cj.chengjian, huawei.libin, xiexiuqi, mark.rutland,
	bobo.shaobowang, guohanjun, acme, alexander.shishkin, jolsa,
	wangnan0, bpf, linux-kernel, linux-perf-users

key_scan_pos is a pointer for getting scan position in
bpf__obj_config_map() for each BPF map configuration term,
but it's misused when error not happened.

Fixes: 066dacbf2a32 ("perf bpf: Add API to set values to map entries in a bpf object")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
 tools/perf/util/bpf-loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 10c187b8b8ea..460056bc072c 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -1225,7 +1225,7 @@ bpf__obj_config_map(struct bpf_object *obj,
 out:
 	free(map_name);
 	if (!err)
-		key_scan_pos += strlen(map_opt);
+		*key_scan_pos += strlen(map_opt);
 	return err;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-20 14:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20  3:32 [PATCH] perf bpf-loader: Add missing '*' for key_scan_pos Wang ShaoBo
2020-05-20  3:32 ` Wang ShaoBo
2020-05-20  7:05 ` Jiri Olsa
2020-05-20 10:22   ` Wangshaobo (bobo)
2020-05-20 10:22     ` Wangshaobo (bobo)
2020-05-20 10:30     ` Jiri Olsa
2020-05-20 14:30     ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.