score: fix dereference of NULL pointer in local_flush_tlb_page()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 11 Aug 2010 21:17:31 +0000 (14:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Aug 2010 15:43:29 +0000 (08:43 -0700)
Don't dereference vma if it's NULL.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/score/mm/tlb-score.c

index 4fa5aa5afecc53e0b614330d44c9589c777137d1..6fdb100244c8193076087ab3c274405d2e9d5e85 100644 (file)
@@ -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;