Revision 9aea5a65aa7a1af9a4236dfaeb0088f1624f9919 authored by Roland McGrath on 08 September 2010, 02:37:06 UTC, committed by Linus Torvalds on 10 September 2010, 15:10:26 UTC
An execve with a very large total of argument/environment strings
can take a really long time in the execve system call.  It runs
uninterruptibly to count and copy all the strings.  This change
makes it abort the exec quickly if sent a SIGKILL.

Note that this is the conservative change, to interrupt only for
SIGKILL, by using fatal_signal_pending().  It would be perfectly
correct semantics to let any signal interrupt the string-copying in
execve, i.e. use signal_pending() instead of fatal_signal_pending().
We'll save that change for later, since it could have user-visible
consequences, such as having a timer set too quickly make it so that
an execve can never complete, though it always happened to work before.

Signed-off-by: Roland McGrath <roland@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7993bc1
History
File Mode Size
Kconfig -rw-r--r-- 9.8 KB
Kconfig.debug -rw-r--r-- 1014 bytes
Makefile -rw-r--r-- 1.6 KB
backing-dev.c -rw-r--r-- 18.8 KB
bootmem.c -rw-r--r-- 24.1 KB
bounce.c -rw-r--r-- 6.5 KB
compaction.c -rw-r--r-- 16.2 KB
debug-pagealloc.c -rw-r--r-- 2.5 KB
dmapool.c -rw-r--r-- 12.9 KB
fadvise.c -rw-r--r-- 3.5 KB
failslab.c -rw-r--r-- 1.6 KB
filemap.c -rw-r--r-- 66.2 KB
filemap_xip.c -rw-r--r-- 11.0 KB
fremap.c -rw-r--r-- 6.7 KB
highmem.c -rw-r--r-- 11.5 KB
hugetlb.c -rw-r--r-- 74.8 KB
hwpoison-inject.c -rw-r--r-- 3.3 KB
init-mm.c -rw-r--r-- 647 bytes
internal.h -rw-r--r-- 7.1 KB
kmemcheck.c -rw-r--r-- 2.8 KB
kmemleak-test.c -rw-r--r-- 3.3 KB
kmemleak.c -rw-r--r-- 49.6 KB
ksm.c -rw-r--r-- 52.4 KB
maccess.c -rw-r--r-- 1.6 KB
madvise.c -rw-r--r-- 11.3 KB
memblock.c -rw-r--r-- 12.5 KB
memcontrol.c -rw-r--r-- 120.2 KB
memory-failure.c -rw-r--r-- 36.2 KB
memory.c -rw-r--r-- 96.9 KB
memory_hotplug.c -rw-r--r-- 22.1 KB
mempolicy.c -rw-r--r-- 67.2 KB
mempool.c -rw-r--r-- 8.9 KB
migrate.c -rw-r--r-- 26.7 KB
mincore.c -rw-r--r-- 7.6 KB
mlock.c -rw-r--r-- 15.5 KB
mm_init.c -rw-r--r-- 3.7 KB
mmap.c -rw-r--r-- 69.3 KB
mmu_context.c -rw-r--r-- 1.4 KB
mmu_notifier.c -rw-r--r-- 8.8 KB
mmzone.c -rw-r--r-- 2.5 KB
mprotect.c -rw-r--r-- 7.6 KB
mremap.c -rw-r--r-- 13.0 KB
msync.c -rw-r--r-- 2.4 KB
nommu.c -rw-r--r-- 48.3 KB
oom_kill.c -rw-r--r-- 19.9 KB
page-writeback.c -rw-r--r-- 38.8 KB
page_alloc.c -rw-r--r-- 150.8 KB
page_cgroup.c -rw-r--r-- 11.4 KB
page_io.c -rw-r--r-- 3.2 KB
page_isolation.c -rw-r--r-- 3.6 KB
pagewalk.c -rw-r--r-- 4.7 KB
percpu-km.c -rw-r--r-- 2.7 KB
percpu-vm.c -rw-r--r-- 13.0 KB
percpu.c -rw-r--r-- 53.7 KB
percpu_up.c -rw-r--r-- 711 bytes
prio_tree.c -rw-r--r-- 6.3 KB
quicklist.c -rw-r--r-- 2.4 KB
readahead.c -rw-r--r-- 15.4 KB
rmap.c -rw-r--r-- 45.5 KB
shmem.c -rw-r--r-- 71.6 KB
slab.c -rw-r--r-- 118.3 KB
slob.c -rw-r--r-- 17.2 KB
slub.c -rw-r--r-- 109.3 KB
sparse-vmemmap.c -rw-r--r-- 6.2 KB
sparse.c -rw-r--r-- 20.5 KB
swap.c -rw-r--r-- 12.9 KB
swap_state.c -rw-r--r-- 10.4 KB
swapfile.c -rw-r--r-- 64.3 KB
thrash.c -rw-r--r-- 1.9 KB
truncate.c -rw-r--r-- 16.4 KB
util.c -rw-r--r-- 7.0 KB
vmalloc.c -rw-r--r-- 60.9 KB
vmscan.c -rw-r--r-- 81.7 KB
vmstat.c -rw-r--r-- 28.9 KB

back to top