Patch "perf symbols: Fix return value when loading PE DSO" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf symbols: Fix return value when loading PE DSO

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-symbols-fix-return-value-when-loading-pe-dso.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d5e352ce593636a5ecc583576e9a7a16d48ba5b8
Author: Nicholas Fraser <nfraser@xxxxxxxxxxxxxxx>
Date:   Wed Feb 10 14:18:02 2021 -0500

    perf symbols: Fix return value when loading PE DSO
    
    [ Upstream commit 77771a97011fa9146ccfaf2983a3a2885dc57b6f ]
    
    The first time dso__load() was called on a PE file it always returned -1
    error. This caused the first call to map__find_symbol() to always fail
    on a PE file so the first sample from each PE file always had symbol
    <unknown>. Subsequent samples succeed however because the DSO is already
    loaded.
    
    This fixes dso__load() to return 0 when successfully loading a DSO with
    libbfd.
    
    Fixes: eac9a4342e5447ca ("perf symbols: Try reading the symbol table with libbfd")
    Signed-off-by: Nicholas Fraser <nfraser@xxxxxxxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Frank Ch. Eigler <fche@xxxxxxxxxx>
    Cc: Huw Davies <huw@xxxxxxxxxxxxxxx>
    Cc: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Kim Phillips <kim.phillips@xxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Cc: Remi Bernon <rbernon@xxxxxxxxxxxxxxx>
    Cc: Song Liu <songliubraving@xxxxxx>
    Cc: Tommi Rantala <tommi.t.rantala@xxxxxxxxx>
    Cc: Ulrich Czekalla <uczekalla@xxxxxxxxxxxxxxx>
    Link: http://lore.kernel.org/lkml/1671b43b-09c3-1911-dbf8-7f030242fbf7@xxxxxxxxxxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index da6036ba0cea4..4d569ad7db02d 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1866,8 +1866,10 @@ int dso__load(struct dso *dso, struct map *map)
 		if (nsexit)
 			nsinfo__mountns_enter(dso->nsinfo, &nsc);
 
-		if (bfdrc == 0)
+		if (bfdrc == 0) {
+			ret = 0;
 			break;
+		}
 
 		if (!is_reg || sirc < 0)
 			continue;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux