perf: fix stack data leak
[firefly-linux-kernel-4.4.55.git] / kernel / perf_counter.c
index a641eb753b8cc92b664966e3a6932c595f07b111..7bc888dfd06ab890c2a55c9b3211f0785146e678 100644 (file)
@@ -2665,6 +2665,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
                header.size += sizeof(cpu_entry);
 
                cpu_entry.cpu = raw_smp_processor_id();
+               cpu_entry.reserved = 0;
        }
 
        if (sample_type & PERF_SAMPLE_PERIOD)