Skip to content

Commit

Permalink
[POWERPC] Fix oops related to 4xx flush_tlb_page modification
Browse files Browse the repository at this point in the history
kmap_atomic calls flush_tlb_page with a NULL VMA and thus we end
up dereferencing a NULL pointer to try and get the context.id.

If the VMA is null use the global pid value of 0.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Kumar Gala committed Nov 9, 2007
1 parent 4c011b1 commit 725fb29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-powerpc/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
static inline void flush_tlb_page(struct vm_area_struct *vma,
unsigned long vmaddr)
{
_tlbie(vmaddr, vma->vm_mm->context.id);
_tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0);
}

static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
unsigned long vmaddr)
{
_tlbie(vmaddr, vma->vm_mm->context.id);
_tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0);
}

static inline void flush_tlb_range(struct vm_area_struct *vma,
Expand Down

0 comments on commit 725fb29

Please sign in to comment.