[S390] init task memory faults.
authorAkinobu Mita <mita@miraclelinux.com>
Thu, 28 Sep 2006 14:55:18 +0000 (16:55 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 28 Sep 2006 14:55:18 +0000 (16:55 +0200)
Lock for mmap_sem is missing on page fault retry for init task
when it fails due to out of memory.

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/fault.c

index 44f0cda7e72e44bb9ae47e6fc42fd284ceb430ab..a393c308bb290d1a0827310653ed205312857f34 100644 (file)
@@ -355,6 +355,7 @@ out_of_memory:
        up_read(&mm->mmap_sem);
        if (tsk->pid == 1) {
                yield();
+               down_read(&mm->mmap_sem);
                goto survive;
        }
        printk("VM: killing process %s\n", tsk->comm);