Skip to contentSkip to conversation

perf_counter: Fix stack corruption in perf_read_hw

tip:perfcounters/core tip-bot for Marti Raudsepp 1 participant 1 message Jun 13, 2009

lore
Share & tools
lore
#0 lore raw
Commit-ID:  d5e8da6449d4ef4bac35ea9b9719a2cda02e7b39
Gitweb:     http://git.kernel.org/tip/d5e8da6449d4ef4bac35ea9b9719a2cda02e7b39
Author:     Marti Raudsepp <[email protected]>
AuthorDate: Sat, 13 Jun 2009 02:35:01 +0300
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sat, 13 Jun 2009 12:58:24 +0200

perf_counter: Fix stack corruption in perf_read_hw

With PERF_FORMAT_ID, perf_read_hw now needs space for up to 4 values.

Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
LKML-Reference: <new-submission>

---
 kernel/perf_counter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/perf_counter.c +1 -1
index 8d14a73..e914daf 100644
@@ -1553,7 +1553,7 @@ static int perf_release(struct inode *inode, struct file *file)
 static ssize_t
 perf_read_hw(struct perf_counter *counter, char __user *buf, size_t count)
 {
-	u64 values[3];
+	u64 values[4];
 	int n;
 
 	/*