aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-11-09 04:51:14 -0500
committerKumar Gala <galak@kernel.crashing.org>2007-11-09 04:51:14 -0500
commit725fb29fd4bcda958b32f4479ad9934117c22019 (patch)
tree85d8760fca2aaa32e22d40de3930626ce1186d44 /include/asm-powerpc
parent4c011b1fb853776459c7d3d7de7b14fa41f28c46 (diff)
[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 <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/tlbflush.h4
1 files changed, 2 insertions, 2 deletions
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)
44static inline void flush_tlb_page(struct vm_area_struct *vma, 44static inline void flush_tlb_page(struct vm_area_struct *vma,
45 unsigned long vmaddr) 45 unsigned long vmaddr)
46{ 46{
47 _tlbie(vmaddr, vma->vm_mm->context.id); 47 _tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0);
48} 48}
49 49
50static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, 50static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
51 unsigned long vmaddr) 51 unsigned long vmaddr)
52{ 52{
53 _tlbie(vmaddr, vma->vm_mm->context.id); 53 _tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0);
54} 54}
55 55
56static inline void flush_tlb_range(struct vm_area_struct *vma, 56static inline void flush_tlb_range(struct vm_area_struct *vma,