Re: [BUG] 2.5.65: Caching MSR_IA32_SYSENTER_CS kills dosemu

Robert Love (rml@tech9.net)
01 Apr 2003 17:16:59 -0500


On Tue, 2003-04-01 at 16:28, Linus Torvalds wrote:

> Can you test this patch? It turns out that "get_cpu()/put_cpu()" are not
> enough - on UP they don't actually disable preemption, since the CPU
> number itself is perfectly stable at 0, of course.

Actually, do they do disable preemption - if they do not, something is
broken.

Because, even on UP, preemption can lead to a race over a variable that
has no locking because its per-CPU. But it would need locking
otherwise, and thus we do need to disable preemption. I.e., per-CPU
vars are only safe on SMP because we assume the other processors won't
touch them. If we start preempting, even on UP, we have problems.

So something else is amiss here...

Robert Love

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