diff options
-rw-r--r-- | mm/memory-failure.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index e424a9dac749..e7ac570dda75 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -745,6 +745,9 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn, }; priv.tk.tsk = p; + if (!p->mm) + return -EFAULT; + mmap_read_lock(p->mm); ret = walk_page_range(p->mm, 0, TASK_SIZE, &hwp_walk_ops, (void *)&priv); |