munmap() don't check sysctl_max_mapcount
PATCH v2 1/1 munmap() don't check sysctl_max_mapcount
In reply to a message not in the archiveFrom http://lkml.org/lkml/2009/10/2/85:
On ia64, the following test program exit abnormally, because glibc thread library called abort().
========================================================
(gdb) bt
#0 0xa000000000010620 in __kernel_syscall_via_break () #1 0x20000000003208e0 in raise () from /lib/libc.so.6.1 #2 0x2000000000324090 in abort () from /lib/libc.so.6.1 #3 0x200000000027c3e0 in __deallocate_stack () from
/lib/libpthread.so.0
#4 0x200000000027f7c0 in start_thread () from /lib/libpthread.so.0 #5 0x200000000047ef60 in __clone2 () from /lib/libc.so.6.1
========================================================
The fact is, glibc call munmap() when thread exitng time for freeing stack, and it assume munlock() never fail. However, munmap() often make vma splitting and it with many mapcount make -ENOMEM.
Oh well, stack unfreeing is not reasonable option. Also munlock() via free() shouldn't failed.
Thus, munmap() shoudn't check max-mapcount.
---
v2: code cleanup
runtest/syscalls | 1 + testcases/kernel/syscalls/mmap/Makefile | 2 + testcases/kernel/syscalls/mmap/mmap11.c | 144 +++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/syscalls/mmap/mmap11.c
runtest/syscalls +1 -0
@@ -1287,3 +1287,4 @@ writev04 writev04 writev05 writev05 writev06 writev06 +mmap11 mmap11 -i 30000
testcases/kernel/syscalls/mmap/Makefile +2 -0
@@ -21,3 +21,5 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(top_srcdir)/include/mk/generic_leaf_target.mk + +LDLIBS += -lpthread
testcases/kernel/syscalls/mmap/mmap11.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
1.7.3.2
From http://lkml.org/lkml/2009/10/2/85:
On ia64, the following test program exit abnormally, because glibc thread library called abort().
========================================================
(gdb) bt
#0 0xa000000000010620 in __kernel_syscall_via_break () #1 0x20000000003208e0 in raise () from /lib/libc.so.6.1 #2 0x2000000000324090 in abort () from /lib/libc.so.6.1 #3 0x200000000027c3e0 in __deallocate_stack () from
/lib/libpthread.so.0
#4 0x200000000027f7c0 in start_thread () from /lib/libpthread.so.0 #5 0x200000000047ef60 in __clone2 () from /lib/libc.so.6.1
========================================================
The fact is, glibc call munmap() when thread exitng time for freeing stack, and it assume munlock() never fail. However, munmap() often make vma splitting and it with many mapcount make -ENOMEM.
Oh well, stack unfreeing is not reasonable option. Also munlock() via free() shouldn't failed.
Thus, munmap() shoudn't check max-mapcount.
---
v2: code cleanup
runtest/syscalls | 1 + testcases/kernel/syscalls/mmap/Makefile | 2 + testcases/kernel/syscalls/mmap/mmap11.c | 144 +++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/syscalls/mmap/mmap11.c
runtest/syscalls +1 -0
@@ -1287,3 +1287,4 @@ writev04 writev04 writev05 writev05 writev06 writev06 +mmap11 mmap11 -i 30000
testcases/kernel/syscalls/mmap/Makefile +2 -0
@@ -21,3 +21,5 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(top_srcdir)/include/mk/generic_leaf_target.mk + +LDLIBS += -lpthread
testcases/kernel/syscalls/mmap/mmap11.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
1.7.3.2
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 19 lines · On Mon, Dec 6, 2010 at 11:36 PM, <[email protected]> wrote:
Quoted 1 line
On ia64, the following test program exit abnormally, because glibc thread library called
abort().========================================================
(gdb) bt
#0 0xa000000000010620 in__kernel_syscall_via_break()
#1 0x20000000003208e0 in raise () from/lib/libc.so.6.1
#2 0x2000000000324090 in abort () from/lib/libc.so.6.1
#3 0x200000000027c3e0 in__deallocate_stack() from/lib/libpthread.so.0
#4 0x200000000027f7c0 instart_thread() from/lib/libpthread.so.0#5 0x200000000047ef60 in__clone2() from/lib/libc.so.6.1
========================================================
The fact is, glibc callmunmap()when thread exitng time for freeing stack, and it assumemunlock()never fail. However,munmap()often make vma splitting and it with many mapcount make-ENOMEM.
Quoted 4 lines
Oh well, stack unfreeing is not reasonable option. Also
munlock()viafree()shouldn't failed.Thus,
munmap()shoudn't check max-mapcount.
Committed.
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list