Skip to contentSkip to conversation

score: Fix dereference of NULL pointer in local_flush_tlb_page()

PATCH New Roel Kluin 1 participant 1 message Feb 8, 2010

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 score: Fix dereference of NULL pointer in local_flush_tlb_page()

Don't dereference vma if it's NULL.

---

arch/score/mm/tlb-score.c +1 -1
index 4fa5aa5..6fdb100 100644
@@ -158,7 +158,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
 
 void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
 {
-	if (!vma || vma->vm_mm->context != 0) {
+	if (vma && vma->vm_mm->context != 0) {
 		unsigned long flags;
 		int oldpid, newpid, idx;
 		unsigned long vma_ASID = vma->vm_mm->context;