Re: [PATCH] Fix preemptible lazy mode bug

From: Jeremy Fitzhardinge
Date: Fri Aug 24 2007 - 02:53:35 EST


Zachary Amsden wrote:
> I recently sent off a fix for lazy vmalloc faults which can happen
> under paravirt when lazy mode is enabled. Unfortunately, I jumped the
> gun a bit on fixing this. I neglected to notice that since the new
> call to flush the MMU update queue is called from the page fault
> handler, it can be pre-empted. Both VMI and Xen use per-cpu variables
> to track lazy mode state, as all previous calls to set, disable, or
> flush lazy mode happened from a non-preemptable state.

Hm. Doing any kind of lazy-state operation with preemption enabled is
fundamentally meaningless. How does it get into a preemptable state
with a lazy mode enabled now? If a sequence of code with preempt
disabled touches a missing vmalloc mapping, it gets a fault to fix up
the mapping, and the fault handler can end up preempting the thread?
That sounds like a larger bug than just paravirt lazy mode problems.

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