Patch "perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new())" has been added to the 5.8-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 bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new())

to the 5.8-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-bench-the-do_run_multi_threaded-function-must-u.patch
and it can be found in the queue-5.8 subdirectory.

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



commit fbde4a849762bd7846c69b18f307a04d57ae6503
Author: YueHaibing <yuehaibing@xxxxxxxxxx>
Date:   Wed Sep 2 22:05:26 2020 +0800

    perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new())
    
    [ Upstream commit e4d71f79cf5c10fa8bc6f5d3bebea570c9c438f1 ]
    
    In case of error, the function perf_session__new() returns ERR_PTR() and
    never returns NULL. The NULL test in the return value check should be
    replaced with IS_ERR()
    
    Committer notes:
    
    This wasn't compiling due to an extraneous '{' not matched by a '}', fix
    it.
    
    Fixes: 13edc237200c ("perf bench: Add a multi-threaded synthesize benchmark")
    Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Link: http://lore.kernel.org/lkml/20200902140526.26916-1-yuehaibing@xxxxxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/bench/synthesize.c b/tools/perf/bench/synthesize.c
index 8d624aea1c5e5..b2924e3181dc3 100644
--- a/tools/perf/bench/synthesize.c
+++ b/tools/perf/bench/synthesize.c
@@ -162,8 +162,8 @@ static int do_run_multi_threaded(struct target *target,
 	init_stats(&event_stats);
 	for (i = 0; i < multi_iterations; i++) {
 		session = perf_session__new(NULL, false, NULL);
-		if (!session)
-			return -ENOMEM;
+		if (IS_ERR(session))
+			return PTR_ERR(session);
 
 		atomic_set(&event_count, 0);
 		gettimeofday(&start, NULL);



[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