lkml.org 
[lkml]   [2014]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] perf/x86: implement cross-HT corruption bug workaround
On Wed, Jun 04, 2014 at 11:34:14PM +0200, Stephane Eranian wrote:

> +static struct event_constraint *
> +intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event,
> + struct event_constraint *c)
> +{

> + if (!(c->flags & PERF_X86_EVENT_DYNAMIC)) {
> +
> + /*
> + * in case we fail, we assume no counter
> + * is supported to be on the safe side
> + */
> + cx = kmalloc(sizeof(*cx), GFP_KERNEL);
> + if (!cx)
> + return &emptyconstraint;
> +

Ok, so forgive me if I'm wrong, but the way we get here is through:

x86_schedule_event()
->start_scheduling()
spin_lock()
->get_event_constraints()
intel_get_excl_constraints()
kmalloc(.gfp=GFP_KERNEL)

How can that ever work?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-06-05 16:21    [W:0.415 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site