]> err.no Git - linux-2.6/commitdiff
[S390] uaccess_pt: add missing down_read() and convert to is_init().
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 8 Dec 2006 14:53:49 +0000 (15:53 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 8 Dec 2006 14:53:49 +0000 (15:53 +0100)
Doesn't seem to be a good idea to duplicate code :)

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/lib/uaccess_pt.c

index 8741bdc09299bf320deb725988e7156ab9a8eac4..633249c3ba9180ea2aa75534b0b64458a6825191 100644 (file)
@@ -8,8 +8,8 @@
  */
 
 #include <linux/errno.h>
-#include <asm/uaccess.h>
 #include <linux/mm.h>
+#include <asm/uaccess.h>
 #include <asm/futex.h>
 
 static inline int __handle_fault(struct mm_struct *mm, unsigned long address,
@@ -60,8 +60,9 @@ out:
 
 out_of_memory:
        up_read(&mm->mmap_sem);
-       if (current->pid == 1) {
+       if (is_init(current)) {
                yield();
+               down_read(&mm->mmap_sem);
                goto survive;
        }
        printk("VM: killing process %s\n", current->comm);