Patch "perf jevents: Free the sys_event_tables list after processing entries" 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 jevents: Free the sys_event_tables list after processing entries

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-jevents-free-the-sys_event_tables-list-after-pr.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 0c4a177970c0dfe7742bf860b5a6d90010e8f8fc
Author: Like Xu <likexu@xxxxxxxxxxx>
Date:   Tue Sep 28 18:29:38 2021 +0800

    perf jevents: Free the sys_event_tables list after processing entries
    
    [ Upstream commit b94729919db2c6737501c36ea6526a36d5d63fa2 ]
    
    The compiler reports that free_sys_event_tables() is dead code.
    
    But according to the semantics, the "LIST_HEAD(sys_event_tables)" should
    also be released, just like we do with 'arch_std_events' in main().
    
    Fixes: e9d32c1bf0cd7a98 ("perf vendor events: Add support for arch standard events")
    Signed-off-by: Like Xu <likexu@xxxxxxxxxxx>
    Reviewed-by: John Garry <john.garry@xxxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    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/20210928102938.69681-1-likexu@xxxxxxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
index c679a79aef51..66ded0f9e85d 100644
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
@@ -1185,6 +1185,7 @@ int main(int argc, char *argv[])
 	}
 
 	free_arch_std_events();
+	free_sys_event_tables();
 	free(mapfile);
 	return 0;
 
@@ -1206,6 +1207,7 @@ err_close_eventsfp:
 		create_empty_mapping(output_file);
 err_out:
 	free_arch_std_events();
+	free_sys_event_tables();
 	free(mapfile);
 	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