Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf inject: Call dso__put() even if dso->hit is set

Otherwise it'll leak the refcount for the DSO. As dso__put() can
handle a NULL dso pointer, we can just call it unconditionally.

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>
Link: http://lore.kernel.org/lkml/20210524225051.1190486-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
0c3f7b38 a92bf335

+2 -2
+2 -2
tools/perf/builtin-inject.c
··· 383 383 if (dso && !dso->hit) { 384 384 dso->hit = 1; 385 385 dso__inject_build_id(dso, tool, machine, sample->cpumode, 0); 386 - dso__put(dso); 387 386 } 387 + dso__put(dso); 388 388 389 389 return perf_event__repipe(tool, event, sample, machine); 390 390 } ··· 447 447 dso->hit = 1; 448 448 dso__inject_build_id(dso, tool, machine, sample->cpumode, 449 449 event->mmap2.flags); 450 - dso__put(dso); 451 450 } 451 + dso__put(dso); 452 452 453 453 perf_event__repipe(tool, event, sample, machine); 454 454