aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-07-21 03:55:05 -0400
committerPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-22 12:05:55 -0400
commitc9f73a3dd27e03411f18a58c0814d51392d2b17a (patch)
tree2b687a70433efc77f3f890bd5f09d31414d26f8e /kernel
parent9b7019ae6a542a801a80df6694c66e240e2c3e39 (diff)
perf: Fix stack data leak
the "reserved" field was not initialized to zero, resulting in 4 bytes of stack data leaking to userspace.... Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_counter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 5c6fae4f43d..ff854fd89a8 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -2666,6 +2666,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2666 header.size += sizeof(cpu_entry); 2666 header.size += sizeof(cpu_entry);
2667 2667
2668 cpu_entry.cpu = raw_smp_processor_id(); 2668 cpu_entry.cpu = raw_smp_processor_id();
2669 cpu_entry.reserved = 0;
2669 } 2670 }
2670 2671
2671 if (sample_type & PERF_SAMPLE_PERIOD) 2672 if (sample_type & PERF_SAMPLE_PERIOD)