diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-08-01 13:49:13 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-08-01 13:49:13 +0900 |
commit | 91ba548cfd5cc8ee93b9435527efb8fa4caf5c5e (patch) | |
tree | c96ed92413044a28d17783e84a8824bfd2437af1 /arch/s390/mm/mmap.c | |
parent | b9ccfda293ee6fca9a89a1584f0900e0627b975e (diff) | |
parent | 4dc4c51675c137c30838425ecc8d471ff5eb138b (diff) | |
download | linux-91ba548cfd5cc8ee93b9435527efb8fa4caf5c5e.tar.bz2 |
Merge branch 'sh/dmaengine' into sh-latest
Diffstat (limited to 'arch/s390/mm/mmap.c')
-rw-r--r-- | arch/s390/mm/mmap.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 573384256c5c..c59a5efa58b1 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c @@ -103,9 +103,15 @@ void arch_pick_mmap_layout(struct mm_struct *mm) int s390_mmap_check(unsigned long addr, unsigned long len) { + int rc; + if (!is_compat_task() && - len >= TASK_SIZE && TASK_SIZE < (1UL << 53)) - return crst_table_upgrade(current->mm, 1UL << 53); + len >= TASK_SIZE && TASK_SIZE < (1UL << 53)) { + rc = crst_table_upgrade(current->mm, 1UL << 53); + if (rc) + return rc; + update_mm(current->mm, current); + } return 0; } @@ -125,6 +131,7 @@ s390_get_unmapped_area(struct file *filp, unsigned long addr, rc = crst_table_upgrade(mm, 1UL << 53); if (rc) return (unsigned long) rc; + update_mm(mm, current); area = arch_get_unmapped_area(filp, addr, len, pgoff, flags); } return area; @@ -147,6 +154,7 @@ s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr, rc = crst_table_upgrade(mm, 1UL << 53); if (rc) return (unsigned long) rc; + update_mm(mm, current); area = arch_get_unmapped_area_topdown(filp, addr, len, pgoff, flags); } |