Re: microcode_ctl question (fwd)

From: Dave Jones
Date: Thu May 06 2004 - 08:19:48 EST


On Thu, May 06, 2004 at 01:23:42PM +0100, Tigran Aivazian wrote:

Hi Tigran,

> Btw, I have just noticed what may be a bug wrt not being aware of kernel
> preemption, i.e. we cache the CPU id in a local variable and later use it,
> but then there seems to be no protection against kernel preemption (i.e.
> we hold no spinlocks, only a semaphore) at that point, so the original CPU
> id may not be quite the same as the CPU id for which the data was
> collected. I should fix this if it is a problem. The question to
> linux-kernel guys is to confirm that this is indeed a bug, i.e. to clarify
> under which condition the kernel preemption can and cannot occur.
>
> In particular can such preemption occur while executing a function called
> via IPI mechanism?

I fixed up microcode.c to use on_each_cpu() last year sometime, which
I thought should fix things up wrt preemption. Can you point to the
bits you think are still problematic ?

Dave

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