From: Kumar Gala Date: Fri, 9 Nov 2007 09:51:14 +0000 (-0600) Subject: [POWERPC] Fix oops related to 4xx flush_tlb_page modification X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=725fb29fd4bcda958b32f4479ad9934117c22019;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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: Kumar Gala --- diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index e7b4c0d298ae..5c9108147644 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h @@ -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,