Re: [patch 1/6] x86, ftrace, hw-branch-tracer: support hotplug cpus

From: Ingo Molnar
Date: Tue Feb 24 2009 - 14:36:49 EST



* Markus Metzger <markus.t.metzger@xxxxxxxxx> wrote:

> Support hotplug cpus.

> +static int __cpuinit bts_hotcpu_handler(struct notifier_block *nfb,
> + unsigned long action, void *hcpu)
> +{
> + unsigned int cpu = (unsigned long)hcpu;
> +
> + mutex_lock(&bts_tracer_mutex);

This is buggy: CPU hotplug handlers must not sleep (they are
called with irqs disabled), while this code does a mutex_lock()
which can sleep.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/