]> err.no Git - linux-2.6/commit
[PATCH] coredump: optimize ->mm users traversal
authorOleg Nesterov <oleg@tv-sign.ru>
Mon, 26 Jun 2006 07:26:05 +0000 (00:26 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:26 +0000 (09:58 -0700)
commitaceecc041217b35df753d1ed6e25bd17c0c558d8
treed78a9961bd8daecc31fc4720868b6f2a9a93aa94
parent2ceb8693ef63ae3d154ce1a05d275f2bb20a5e4c
[PATCH] coredump: optimize ->mm users traversal

zap_threads() iterates over all threads to find those ones which share
current->mm.  All threads in the thread group share the same ->mm, so we can
skip entire thread group if it has another ->mm.

This patch shifts the killing of thread group into the newly added
zap_process() function.  This looks as unnecessary complication, but it is
used in further patches.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/exec.c