diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 128fcf00be45e38b9fe8821c6c0e8f241014553c..97a00a8e6f79e277bc383e96d1281417d7c3a6da 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -693,8 +693,10 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn, (void *)&priv); if (ret == 1 && priv.tk.addr) kill_proc(&priv.tk, pfn, flags); + else + ret = 0; mmap_read_unlock(p->mm); - return ret ? -EFAULT : -EHWPOISON; + return ret > 0 ? -EHWPOISON : -EFAULT; } static const char *action_name[] = {