Commit 725fb29f authored by Kumar Gala's avatar Kumar Gala

[POWERPC] Fix oops related to 4xx flush_tlb_page modification

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: default avatarKumar Gala <galak@kernel.crashing.org>
parent 4c011b1f
...@@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm) ...@@ -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, static inline void flush_tlb_page(struct vm_area_struct *vma,
unsigned long vmaddr) 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, static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
unsigned long vmaddr) 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, static inline void flush_tlb_range(struct vm_area_struct *vma,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment