From: Xiao Guangrong Date: Thu, 10 Dec 2009 06:00:51 +0000 (+0800) Subject: perf_event: Fix perf_swevent_hrtimer() variable initialization X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=21140f4d3387aa2213f1deea0128df1dbf924379;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf_event: Fix perf_swevent_hrtimer() variable initialization fix: [] ? printk+0x1d/0x24 [] ? perf_prepare_sample+0x269/0x280 [] warn_slowpath_common+0x71/0xd0 [] ? perf_prepare_sample+0x269/0x280 [] warn_slowpath_null+0x1a/0x20 [] perf_prepare_sample+0x269/0x280 [] ? cpu_clock+0x53/0x90 [] __perf_event_overflow+0x2a8/0x300 [] perf_event_overflow+0x1b/0x30 [] perf_swevent_hrtimer+0x7f/0x120 This is because 'data.raw' variable not initialize. Signed-off-by: Xiao Guangrong Acked-by: Peter Zijlstra Cc: Frederic Weisbecker Cc: Paul Mackerras LKML-Reference: <4B208E93.1010801@cn.fujitsu.com> Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 94e1b28333ae..3a5d6c4786bb 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -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(); /*