diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-10-30 15:50:32 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-11-09 18:12:33 +0100 |
commit | 267fb27352b6fc9fdbad753127a239f75618ecbc (patch) | |
tree | 2f99dd2dedf21e53d329e16cdb615e2c234202bb /arch/s390 | |
parent | perf/core: Fix a memory leak in perf_event_parse_addr_filter() (diff) | |
download | linux-267fb27352b6fc9fdbad753127a239f75618ecbc.tar.xz linux-267fb27352b6fc9fdbad753127a239f75618ecbc.zip |
perf: Reduce stack usage of perf_output_begin()
__perf_output_begin() has an on-stack struct perf_sample_data in the
unlikely case it needs to generate a LOST record. However, every call
to perf_output_begin() must already have a perf_sample_data on-stack.
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201030151954.985416146@infradead.org
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/perf_cpum_sf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index 4f9e4626df55..00255ae3979d 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c @@ -672,7 +672,7 @@ static void cpumsf_output_event_pid(struct perf_event *event, rcu_read_lock(); perf_prepare_sample(&header, data, event, regs); - if (perf_output_begin(&handle, event, header.size)) + if (perf_output_begin(&handle, data, event, header.size)) goto out; /* Update the process ID (see also kernel/events/core.c) */ |