mm: Avoid a risk of null pointer.
Subsystems (2)
PATCH 1/1 mm: Avoid a risk of null pointer.
There is a probability that we will get a null pointer when we use find_vm() interface.
Signed-off-by jiping huang <[email protected]>
mm/mempolicy.c +5 -0
@@ -1079,6 +1079,11 @@ static long migrate_to_node(struct mm_struct *mm, int source, int dest,mmap_read_lock (mm); vma =find_vma (mm,0 ); +if (!vma) { +mmap_read_unlock (mm); +return -EFAULT ; + } +/* * This does not migrate the range, but isolates all pages that * need migration. Between passing in the full user address
Signature · 1 line
2.34.1