Messages in this thread | | | Date | Wed, 1 Oct 2003 17:18:05 +0100 | From | Jamie Lokier <> | Subject | Re: [PATCH] Mutilated form of Andi Kleen's AMD prefetch errata patch |
| |
Andrew Morton wrote: > I'm a bit confused as to what significance the faulting address has btw: > kernel code can raise prefetch faults against addresses which are less > than, and presumably greater than TASK_SIZE.
The address itself is not important.
What's important is that if a prefetch erratum fault happens while mmap_sem or any spinlock are held, then do_page_fault must not try to acquire mmap_sem. That can deadlock or schedule; both are bad.
Checking the address is an easy way to ensure that: addr >= TASK_SIZE implies that no vma lookup is needed, hence mmap_sem is not needed.
There is already an addr >= TASK_SIZE test, so this can be hooked in without any penalty, in fact it will streamline the existing code a bit.
-- Jamie
- 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/
| |