Patch "perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars" 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 dso__fprintf_symbols_by_name() to return the number of printed chars

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-dso__fprintf_symbols_by_name-to-ret.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 fac1699d123dcdec0262239e6a8acd17aafef0f8
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Date:   Mon Mar 8 11:17:51 2021 -0300

    perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars
    
    [ Upstream commit 210e4c89ef61432040c6cd828fefa441f4887186 ]
    
    The 'ret' variable was initialized to zero but then it was not updated
    from the fprintf() return, fix it.
    
    Reported-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
    cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    cc: Ingo Molnar <mingo@xxxxxxxxxx>
    cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    cc: Mark Rutland <mark.rutland@xxxxxxx>
    cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Cc: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
    Fixes: 90f18e63fbd00513 ("perf symbols: List symbols in a dso in ascending name order")
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/symbol_fprintf.c b/tools/perf/util/symbol_fprintf.c
index 35c936ce33ef..2664fb65e47a 100644
--- a/tools/perf/util/symbol_fprintf.c
+++ b/tools/perf/util/symbol_fprintf.c
@@ -68,7 +68,7 @@ size_t dso__fprintf_symbols_by_name(struct dso *dso,
 
 	for (nd = rb_first_cached(&dso->symbol_names); nd; nd = rb_next(nd)) {
 		pos = rb_entry(nd, struct symbol_name_rb_node, rb_node);
-		fprintf(fp, "%s\n", pos->sym.name);
+		ret += fprintf(fp, "%s\n", pos->sym.name);
 	}
 
 	return ret;



[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