lkml.org 
[lkml]   [2001]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Re: Linux 2.4.5-ac6
On Fri, Jun 01, 2001 at 10:27:09PM -0400, Tom Vier wrote:
> > o Fix mmap cornercase (Maciej Rozycki)
>
> when i try running osf/1 netscape on alpha, mmap of libXmu fails. works fine
> on -ac5.

Indeed. Netscape is essentially 32 bit application, so probably
it treats TASK_UNMAPPED_BASE (0x20000000000) as failure.
A tad more respect of specified address fixes that.
Also small fix for endless compile warnings with gcc 3.0 on
alpha (`struct mm_struct' declared inside parameter list).
Ivan.

--- 2.4.5-ac7/mm/mmap.c Mon Jun 4 14:19:02 2001
+++ linux/mm/mmap.c Mon Jun 4 19:22:31 2001
@@ -404,10 +404,13 @@ static inline unsigned long arch_get_unm

if (addr) {
addr = PAGE_ALIGN(addr);
- vma = find_vma(current->mm, addr);
- if (TASK_SIZE - len >= addr &&
- (!vma || addr + len <= vma->vm_start))
- return addr;
+ for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
+ if (TASK_SIZE - len < addr)
+ break;
+ if (!vma || addr + len <= vma->vm_start)
+ return addr;
+ addr = vma->vm_end;
+ }
}
addr = PAGE_ALIGN(TASK_UNMAPPED_BASE);

--- 2.4.5-ac7/include/linux/binfmts.h Mon Jun 4 14:19:00 2001
+++ linux/include/linux/binfmts.h Mon Jun 4 20:24:50 2001
@@ -32,6 +32,9 @@ struct linux_binprm{
unsigned long loader, exec;
};

+/* Forward declaration */
+struct mm_struct;
+
/*
* This structure defines the functions that are used to load the binary formats that
* linux accepts.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:54    [from the cache]
©2003-2011 Jasper Spaans