Skip to content

Commit 570dcf2

Browse files
author
Al Viro
committed
Kill ancient crap in s390 compat mmap
We've had TASK_SIZE set to 1<<31 for 31bit tasks since May 2004. Before that old32_mmap() had to deal with do_mmap_pgoff() giving it an address out of range. It had tried to do that by checking return value and doing do_munmap() (at wrong address, BTW). IOW, that code had been dead for 5.5 years (and bogus - for 8). Kill. Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 2ea1d13 commit 570dcf2

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎arch/s390/kernel/compat_linux.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -642,11 +642,6 @@ static inline long do_mmap2(
642642

643643
down_write(&current->mm->mmap_sem);
644644
error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
645-
if (!IS_ERR((void *) error) && error + len >= 0x80000000ULL) {
646-
/* Result is out of bounds. */
647-
do_munmap(current->mm, addr, len);
648-
error = -ENOMEM;
649-
}
650645
up_write(&current->mm->mmap_sem);
651646

652647
if (file)

0 commit comments

Comments
 (0)