diff options
Diffstat (limited to 'arch/i386/mm/fault.c')
-rw-r--r-- | arch/i386/mm/fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 5e17a3f43b41..2581575786c1 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -440,7 +440,7 @@ good_area: | |||
440 | case 1: /* read, present */ | 440 | case 1: /* read, present */ |
441 | goto bad_area; | 441 | goto bad_area; |
442 | case 0: /* read, not present */ | 442 | case 0: /* read, not present */ |
443 | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) | 443 | if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))) |
444 | goto bad_area; | 444 | goto bad_area; |
445 | } | 445 | } |
446 | 446 | ||
@@ -589,7 +589,7 @@ no_context: | |||
589 | */ | 589 | */ |
590 | out_of_memory: | 590 | out_of_memory: |
591 | up_read(&mm->mmap_sem); | 591 | up_read(&mm->mmap_sem); |
592 | if (tsk->pid == 1) { | 592 | if (is_init(tsk)) { |
593 | yield(); | 593 | yield(); |
594 | down_read(&mm->mmap_sem); | 594 | down_read(&mm->mmap_sem); |
595 | goto survive; | 595 | goto survive; |