sh: Handle a NULL vma in __update_tlb() for the fast-path.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 29 Jul 2009 13:06:58 +0000 (22:06 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 29 Jul 2009 13:06:58 +0000 (22:06 +0900)
The TLB miss fast-path presently calls in to update_mmu_cache() to
set up the entry, and does so with a NULL vma. Check for vma validity
in the __update_tlb() ptrace checks.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/tlb-pteaex.c
arch/sh/mm/tlb-sh3.c
arch/sh/mm/tlb-sh4.c

index 9aabd313cededbae5f256b0fa13ce8c7a3a79f7f..409b7c2b4b9d9485082f714150aa2db85e0f351f 100644 (file)
@@ -23,7 +23,7 @@ void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
        /*
         * Handle debugger faulting in for debugee.
         */
-       if (current->active_mm != vma->vm_mm)
+       if (vma && current->active_mm != vma->vm_mm)
                return;
 
        local_irq_save(flags);
index 425f1f23cf9371f333d810bdb1801e1f2e1b52d0..ace8e6d2f59d05830cf12b76a2fcd2b269cad560 100644 (file)
@@ -34,7 +34,7 @@ void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
        /*
         * Handle debugger faulting in for debugee.
         */
-       if (current->active_mm != vma->vm_mm)
+       if (vma && current->active_mm != vma->vm_mm)
                return;
 
        local_irq_save(flags);
index 81199f1e594517f3721fb96f5ae9b0c74a8f4dd9..7d3c63e707a5b5109c803d8a5746ac653570626c 100644 (file)
@@ -22,7 +22,7 @@ void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
        /*
         * Handle debugger faulting in for debugee.
         */
-       if (current->active_mm != vma->vm_mm)
+       if (vma && current->active_mm != vma->vm_mm)
                return;
 
        local_irq_save(flags);