Re: [PATCH 1/3] stop_machine: kill __stop_machine()

From: Tejun Heo
Date: Thu Jun 16 2011 - 08:45:08 EST


On Thu, Jun 16, 2011 at 02:12:52PM +0200, Peter Zijlstra wrote:
> On Tue, 2011-06-14 at 19:06 +0200, Tejun Heo wrote:
> > +++ b/arch/x86/kernel/alternative.c
> > @@ -719,8 +719,7 @@ void *__kprobes text_poke_smp(void *addr, const void *opcode, size_t len)
> > tpp.nparams = 1;
> > atomic_set(&stop_machine_first, 1);
> > wrote_text = 0;
> > - /* Use __stop_machine() because the caller already got online_cpus. */
> > - __stop_machine(stop_machine_text_poke, (void *)&tpp, cpu_online_mask);
> > + stop_machine(stop_machine_text_poke, (void *)&tpp, cpu_online_mask);
> > return addr;
> > }
>
> Please have a look at:
>
> ---
> commit d91309f69b7bdb64aeb30106fde8d18c5dd354b5
> Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Date: Fri Feb 11 22:07:46 2011 +0100
>
> x86: Fix text_poke_smp_batch() deadlock
>
> Fix this deadlock - we are already holding the mutex:

Ah, right, I thought cpu_hotplug_begin() sets active_writer and then
returns with cpu_hotplug.lock released. Weird locking there.
Anyways, this one should be dropped then and I don't think it affects
the rest of the series much.

Thanks.

--
tejun
--
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/