From: Roel Kluin Date: Wed, 11 Aug 2010 21:17:31 +0000 (-0700) Subject: score: fix dereference of NULL pointer in local_flush_tlb_page() X-Git-Tag: v2.6.36-rc1~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17e465034a174d23e08cbb964aeda5e41e5d84ca;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git score: fix dereference of NULL pointer in local_flush_tlb_page() Don't dereference vma if it's NULL. Signed-off-by: Roel Kluin Cc: Chen Liqin Cc: Lennox Wu Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/score/mm/tlb-score.c b/arch/score/mm/tlb-score.c index 4fa5aa5..6fdb1002 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;