perf_event: Fix perf_swevent_hrtimer() variable initialization
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Thu, 10 Dec 2009 06:00:51 +0000 (14:00 +0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 10 Dec 2009 06:11:05 +0000 (07:11 +0100)
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.raw' variable not initialize.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4B208E93.1010801@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c

index 94e1b28333aed85c62513a6bce62d73bc12f4588..3a5d6c4786bb711c49c74f3d5f00b3b55f59fd1d 100644 (file)
@@ -4010,6 +4010,7 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer)
        event->pmu->read(event);
 
        data.addr = 0;
+       data.raw = NULL;
        data.period = event->hw.last_period;
        regs = get_irq_regs();
        /*