Skip to content

Commit

Permalink
sh: Handle a NULL vma in __update_tlb() for the fast-path.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Jul 29, 2009
1 parent 9cef749 commit 3ed6e12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/sh/mm/tlb-pteaex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/tlb-sh3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/tlb-sh4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3ed6e12

Please sign in to comment.