diff options
author | Jeff Dike | 2006-04-19 07:20:24 +0200 |
---|---|---|
committer | Linus Torvalds | 2006-04-19 18:13:49 +0200 |
commit | b73781c866f671ff5a84d7c840510b43e8731d13 (patch) | |
tree | b8e5d32802fd048e5229615576dc4fda82c722d4 /arch/um/os-Linux | |
parent | [PATCH] for_each_possible_cpu: x86_64 (diff) | |
download | kernel-qcow2-linux-b73781c866f671ff5a84d7c840510b43e8731d13.tar.gz kernel-qcow2-linux-b73781c866f671ff5a84d7c840510b43e8731d13.tar.xz kernel-qcow2-linux-b73781c866f671ff5a84d7c840510b43e8731d13.zip |
[PATCH] uml: MADV_REMOVE fixes
MADV_REMOVE fixes - change the test mapping to be MAP_SHARED instead of
MAP_PRIVATE, as MADV_REMOVE on MAP_PRIVATE maps won't work. Also, use
the kernel's definition of MADV_REMOVE instead of hardcoding it if there
isn't a libc definition.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r-- | arch/um/os-Linux/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 8176b0b52047..2064e8400d94 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c @@ -190,7 +190,7 @@ int os_unmap_memory(void *addr, int len) } #ifndef MADV_REMOVE -#define MADV_REMOVE 0x5 /* remove these pages & resources */ +#define MADV_REMOVE KERNEL_MADV_REMOVE #endif int os_drop_memory(void *addr, int length) @@ -216,7 +216,7 @@ int can_drop_memory(void) } addr = mmap64(NULL, UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE, - MAP_PRIVATE, fd, 0); + MAP_SHARED, fd, 0); if(addr == MAP_FAILED){ printk("Mapping test memory file failed, err = %d\n", -errno); return 0; |