Re: Subject: [PATCH] linux-acpi: smp_alternatives sleeping inspinlock

From: Ingo Molnar
Date: Sun Sep 14 2008 - 09:18:45 EST



* Raz <raziebe@xxxxxxxxx> wrote:

> From: Raz Ben Yehuda <raziebe@xxxxxxxxx>
>
> When booting a kernel with PREEMPT_ENABLE and SLAB_DEBUG, unplugging a
> processor results in BUG in slab.

could you please post that BUG? (and which version of the kernel you
have tried, and exactly what you did to trigger this bug)

note that the conversion to a sleeping lock:

> -static DEFINE_SPINLOCK(smp_alt);
> +static __DECLARE_SEMAPHORE_GENERIC(smp_alt_lock, 1);

is already done correctly in the latest upstream kernel, see this
commit:

# 2f1dafe: x86: fix SMP alternatives: use mutex instead of spinlock

the better solution is to use a mutex, not a semaphore. This fix is part
of the v2.6.26 kernel.

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/