Re: preempt bug in set_pmd_pfn?

From: Ingo Molnar
Date: Thu Mar 06 2008 - 07:53:12 EST



* Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

> It seems to me that the correct fix is to just make __set_fixmap
> disable preemption for its duration; it probably doesn't make much
> difference for the native case, and it makes Xen happy.

actually, i think the correct approach is to remove the TLB flushing and
perhaps to check that the old pte is not present. Do we ever _change_
mappings via __set_fixmap()? I think we only ever install them.

but if we ever change them somewhere then the correct approach is to do
a flush_tlb_all(). It's not just about preemption but about the fact
that we modified the kernel address space and we must propagate that to
all CPUs.

the vmalloc() backtrace you sent - how did set_pte_pfn() get into that
codepath - vmalloc shouldnt be using __set_fixmap().

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/