diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/lib/usercopy.c | 2 | ||||
-rw-r--r-- | arch/i386/mm/fault.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c index efc7e7d5f4d0..08502fc6d0cb 100644 --- a/arch/i386/lib/usercopy.c +++ b/arch/i386/lib/usercopy.c | |||
@@ -739,7 +739,7 @@ survive: | |||
739 | retval = get_user_pages(current, current->mm, | 739 | retval = get_user_pages(current, current->mm, |
740 | (unsigned long )to, 1, 1, 0, &pg, NULL); | 740 | (unsigned long )to, 1, 1, 0, &pg, NULL); |
741 | 741 | ||
742 | if (retval == -ENOMEM && current->pid == 1) { | 742 | if (retval == -ENOMEM && is_init(current)) { |
743 | up_read(¤t->mm->mmap_sem); | 743 | up_read(¤t->mm->mmap_sem); |
744 | blk_congestion_wait(WRITE, HZ/50); | 744 | blk_congestion_wait(WRITE, HZ/50); |
745 | goto survive; | 745 | goto survive; |
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 50d8617391dd..2581575786c1 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -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; |