lkml.org 
[lkml]   [2003]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [parisc-linux] Re: Problems with kernel mmap (failing tst-mmap-eofsync in glibc on parisc)
From
Date
On Sat, 2003-08-23 at 02:22, Hugh Dickins wrote:
> Good idea. It's VM_MAYSHARE you need to check for.

OK, to get all this to work, there's a corner case in do_mremap() that I
need to be fixed:

When choosing the flags for the new area, it keys off VM_SHARED to
determine whether MAP_SHARED is passed to the mapping. It has to key of
VM_MAYSHARE to preserve VM_MAYSHARE on the new mapping.

Patch below.

James


===== mremap.c 1.32 vs edited =====
--- 1.32/mm/mremap.c Thu Aug 7 12:29:10 2003
+++ edited/mremap.c Sat Aug 23 10:54:21 2003
@@ -420,7 +420,7 @@
if (flags & MREMAP_MAYMOVE) {
if (!(flags & MREMAP_FIXED)) {
unsigned long map_flags = 0;
- if (vma->vm_flags & VM_SHARED)
+ if (vma->vm_flags & VM_MAYSHARE)
map_flags |= MAP_SHARED;

new_addr = get_unmapped_area(vma->vm_file, 0, new_len,
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.084 / U:3.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site