diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2010-10-27 18:34:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:12 -0400 |
commit | 9b1bf12d5d51bca178dea21b04a0805e29d60cf1 (patch) | |
tree | 902a2c0e5882a2152da59a589958d6426dc84643 /include/linux/init_task.h | |
parent | b84011508360d6885a9d95a235ec77d56f133377 (diff) |
signals: move cred_guard_mutex from task_struct to signal_struct
Oleg Nesterov pointed out we have to prevent multiple-threads-inside-exec
itself and we can reuse ->cred_guard_mutex for it. Yes, concurrent
execve() has no worth.
Let's move ->cred_guard_mutex from task_struct to signal_struct. It
naturally prevent multiple-threads-inside-exec.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r-- | include/linux/init_task.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 2fea6c8ef6ba..1f8c06ce0fa6 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -29,6 +29,8 @@ extern struct fs_struct init_fs; | |||
29 | .running = 0, \ | 29 | .running = 0, \ |
30 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ | 30 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ |
31 | }, \ | 31 | }, \ |
32 | .cred_guard_mutex = \ | ||
33 | __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ | ||
32 | } | 34 | } |
33 | 35 | ||
34 | extern struct nsproxy init_nsproxy; | 36 | extern struct nsproxy init_nsproxy; |
@@ -145,8 +147,6 @@ extern struct cred init_cred; | |||
145 | .group_leader = &tsk, \ | 147 | .group_leader = &tsk, \ |
146 | RCU_INIT_POINTER(.real_cred, &init_cred), \ | 148 | RCU_INIT_POINTER(.real_cred, &init_cred), \ |
147 | RCU_INIT_POINTER(.cred, &init_cred), \ | 149 | RCU_INIT_POINTER(.cred, &init_cred), \ |
148 | .cred_guard_mutex = \ | ||
149 | __MUTEX_INITIALIZER(tsk.cred_guard_mutex), \ | ||
150 | .comm = "swapper", \ | 150 | .comm = "swapper", \ |
151 | .thread = INIT_THREAD, \ | 151 | .thread = INIT_THREAD, \ |
152 | .fs = &init_fs, \ | 152 | .fs = &init_fs, \ |