Kaynağa Gözat

sh: Handle a NULL vma in __update_tlb() for the fast-path.

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>
Paul Mundt 16 yıl önce
ebeveyn
işleme
3ed6e12939
3 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 1 1
      arch/sh/mm/tlb-pteaex.c
  2. 1 1
      arch/sh/mm/tlb-sh3.c
  3. 1 1
      arch/sh/mm/tlb-sh4.c

+ 1 - 1
arch/sh/mm/tlb-pteaex.c

@@ -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);

+ 1 - 1
arch/sh/mm/tlb-sh3.c

@@ -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);

+ 1 - 1
arch/sh/mm/tlb-sh4.c

@@ -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);