[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130327094932.GA8385@pd.tnic>
Date: Wed, 27 Mar 2013 10:49:32 +0100
From: Borislav Petkov <bp@...en8.de>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
lkml <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>,
Namhyung Kim <namhyung.kim@....com>,
Jiri Olsa <jolsa@...hat.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: BUG: using smp_processor_id() in preemptible [00000000] code:
asm/8267
On Wed, Mar 27, 2013 at 03:02:10PM +0900, Namhyung Kim wrote:
> > --
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index 7b4a55d41efc..f3bb3384a106 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -4455,8 +4455,11 @@ static void perf_event_task_event(struct perf_task_event *task_event)
> > next:
> > put_cpu_ptr(pmu->pmu_cpu_context);
> > }
> > +
> > + preempt_disable();
> > if (task_event->task_ctx)
> > perf_event_task_ctx(task_event->task_ctx, task_event);
> > + preempt_enable();
Ok, just for my own understanding: how do the events on the
->task_ctx->event_list relate to the current cpu in this path? I mean,
we're on the task exit path here so is it possible to be rescheduled
somewhere else and the check in event_filter_match to become
meaningless?
Because with this fix, we have a small window between enabling
preemption after the last pmu context and disabling it again to get
moved somewhere else.
Hmm.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists