Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

score: fix dereference of NULL pointer in local_flush_tlb_page()

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>

authored by

Roel Kluin and committed by
Linus Torvalds
17e46503 7b958090

+1 -1
+1 -1
arch/score/mm/tlb-score.c
··· 158 158 159 159 void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) 160 160 { 161 - if (!vma || vma->vm_mm->context != 0) { 161 + if (vma && vma->vm_mm->context != 0) { 162 162 unsigned long flags; 163 163 int oldpid, newpid, idx; 164 164 unsigned long vma_ASID = vma->vm_mm->context;