Cut hugetlb case early for 32bit on ia64
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 30 Nov 2009 22:34:06 +0000 (17:34 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 11 Dec 2009 11:34:10 +0000 (06:34 -0500)
It won't work anyway (hugetlb addresses there are way beyond 4Gb)
and it's easier to stop it here.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/ia64/ia32/sys_ia32.c

index 429ec968c9ee62178ffcc8c3afe1005510695eb1..045b746b98081e493b3ea85244cf10113c83126a 100644 (file)
@@ -858,6 +858,9 @@ ia32_do_mmap (struct file *file, unsigned long addr, unsigned long len, int prot
 
        prot = get_prot32(prot);
 
+       if (flags & MAP_HUGETLB)
+               return -ENOMEM;
+
 #if PAGE_SHIFT > IA32_PAGE_SHIFT
        mutex_lock(&ia32_mmap_mutex);
        {