Skip to content

Commit

Permalink
[S390] uaccess_pt: add missing down_read() and convert to is_init().
Browse files Browse the repository at this point in the history
Doesn't seem to be a good idea to duplicate code :)

Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
heicarst authored and Martin Schwidefsky committed Dec 8, 2006
1 parent bff19b1 commit 2215591
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/s390/lib/uaccess_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -60,8 +60,9 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address,

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);
Expand Down

0 comments on commit 2215591

Please sign in to comment.