Commit bfd1b83
perf evlist: Fix cpu/thread map leak
Asan reported leak of cpu and thread maps as they have one more refcount
than released. I found that after setting evlist maps it should release
it's refcount.
It seems to be broken from the beginning so I chose the original commit
as the culprit. But not sure how it's applied to stable trees since
there are many changes in the code after that.
Fixes: 7e2ed09 ("perf evlist: Store pointer to the cpu and thread maps")
Fixes: 4112eb1 ("perf evlist: Default to syswide target when no thread/cpu maps set")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200915031819.386559-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent b033ab1 commit bfd1b83
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
949 | 953 | | |
950 | 954 | | |
951 | 955 | | |
| |||
1273 | 1277 | | |
1274 | 1278 | | |
1275 | 1279 | | |
1276 | | - | |
1277 | | - | |
| 1280 | + | |
| 1281 | + | |
1278 | 1282 | | |
1279 | 1283 | | |
1280 | | - | |
| 1284 | + | |
| 1285 | + | |
1281 | 1286 | | |
1282 | 1287 | | |
1283 | 1288 | | |
| |||
0 commit comments