public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] score: Fix dereference of NULL pointer in local_flush_tlb_page()
@ 2010-02-08 21:17 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2010-02-08 21:17 UTC (permalink / raw)
  To: liqin.chen, arnd, LKML

Don't dereference vma if it's NULL.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/score/mm/tlb-score.c b/arch/score/mm/tlb-score.c
index 4fa5aa5..6fdb100 100644
--- a/arch/score/mm/tlb-score.c
+++ b/arch/score/mm/tlb-score.c
@@ -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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-08 21:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 21:17 [PATCH] score: Fix dereference of NULL pointer in local_flush_tlb_page() Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox