projects/linux·commit 17e46503

score: fix dereference of NULL pointer in local_flush_tlb_page()

17e46503 · Roel Kluin <[email protected]> · 2010-08-11 14:17:31 -07:00

Don't dereference vma if it's NULL.

Signed-off-by: Roel Kluin <[email protected]>
Cc: Chen Liqin <[email protected]>
Cc: Lennox Wu <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
17e465034a174d23e08cbb964aeda5e41e5d84ca
Parents
7b958090

Changes

1 files changed · +1 −1

FileStatusAddDelContent
arch/score/mm/tlb-score.cmodified+1−1View file

arch/score/mm/tlb-score.c

View file
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;