public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf_event: fix perf_swevent_hrtimer()
@ 2009-12-10  4:14 Xiao Guangrong
  2009-12-10  5:15 ` Peter Zijlstra
  0 siblings, 1 reply; 7+ messages in thread
From: Xiao Guangrong @ 2009-12-10  4:14 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Frederic Weisbecker, Peter Zijlstra, Paul Mackerras, LKML

fix:
 [<c0477471>] ? printk+0x1d/0x24
 [<c01c98f9>] ? perf_prepare_sample+0x269/0x280
 [<c0149231>] warn_slowpath_common+0x71/0xd0
 [<c01c98f9>] ? perf_prepare_sample+0x269/0x280
 [<c01492aa>] warn_slowpath_null+0x1a/0x20
 [<c01c98f9>] perf_prepare_sample+0x269/0x280
 [<c016e9f3>] ? cpu_clock+0x53/0x90
 [<c01cc368>] __perf_event_overflow+0x2a8/0x300
 [<c01ccc3b>] perf_event_overflow+0x1b/0x30
 [<c01ccccf>] perf_swevent_hrtimer+0x7f/0x120

This is because 'data' variable not initialize.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 kernel/perf_event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 0bd0f67..41c2dde 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4009,7 +4009,7 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer)
 	event	= container_of(hrtimer, struct perf_event, hw.hrtimer);
 	event->pmu->read(event);
 
-	data.addr = 0;
+	memset(&data, 0, sizeof(data));
 	data.period = event->hw.last_period;
 	regs = get_irq_regs();
 	/*
-- 
1.6.1.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-10 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10  4:14 [PATCH] perf_event: fix perf_swevent_hrtimer() Xiao Guangrong
2009-12-10  5:15 ` Peter Zijlstra
2009-12-10  5:24   ` Xiao Guangrong
2009-12-10  6:00   ` [PATCH v2] " Xiao Guangrong
2009-12-10  6:18     ` [tip:perf/urgent] perf_event: Fix perf_swevent_hrtimer() variable initialization tip-bot for Xiao Guangrong
2009-12-10  9:08   ` [PATCH] perf_event: fix variable initialization in other path Xiao Guangrong
2009-12-10 16:24     ` [tip:perf/urgent] perf_event: Fix variable initialization in other codepaths tip-bot for Xiao Guangrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox