]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/mm/fault.c
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux...
[linux-2.6-omap-h63xx.git] / arch / mips / mm / fault.c
index e3a617224868f04643719e68c9020d9941688efc..8423d859077949520de140f5b03d7cfdecda92e1 100644 (file)
@@ -89,7 +89,7 @@ good_area:
                if (!(vma->vm_flags & VM_WRITE))
                        goto bad_area;
        } else {
-               if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
+               if (!(vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)))
                        goto bad_area;
        }
 
@@ -171,7 +171,7 @@ no_context:
  */
 out_of_memory:
        up_read(&mm->mmap_sem);
-       if (tsk->pid == 1) {
+       if (is_init(tsk)) {
                yield();
                down_read(&mm->mmap_sem);
                goto survive;