Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753930AbZLAJhJ (ORCPT ); Tue, 1 Dec 2009 04:37:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753636AbZLAJhI (ORCPT ); Tue, 1 Dec 2009 04:37:08 -0500 Received: from casper.infradead.org ([85.118.1.10]:44389 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753637AbZLAJhH (ORCPT ); Tue, 1 Dec 2009 04:37:07 -0500 Subject: Re: [PATCH] perf_event: initialize data.period in perf_swevent_hrtimer() From: Peter Zijlstra To: Xiao Guangrong Cc: Ingo Molnar , Frederic Weisbecker , LKML In-Reply-To: <4B14E220.2050107@cn.fujitsu.com> References: <4B14E220.2050107@cn.fujitsu.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 01 Dec 2009 10:37:05 +0100 Message-ID: <1259660225.26472.594.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1050 Lines: 31 On Tue, 2009-12-01 at 17:30 +0800, Xiao Guangrong wrote: > In current code in perf_swevent_hrtimer(), data.period is not initialized, Ah, very nice catch. Acked-by: Peter Zijlstra > Signed-off-by: Xiao Guangrong > --- > kernel/perf_event.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/kernel/perf_event.c b/kernel/perf_event.c > index 0b9ca2d..040ee51 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.period = event->hw.last_period; > regs = get_irq_regs(); > /* > * In case we exclude kernel IPs or are somehow not in interrupt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/