aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-05 01:35:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-05 01:35:59 -0400
commit140d0b2108faebc77c6523296e211e509cb9f5f9 (patch)
treece8291a62b08810cffacf7a0d377fc06c477aa44 /ipc
parent24f0eed2668b059e847ff145848ddacb75419acc (diff)
Do 'shm_init_ns()' in an early pure_initcall
This isn't really critical any more, since other patches (commit 298507d4d2cf: "shm: optimize exit_shm()") have caused us to not actually need to touch the rw_mutex unless there are actual shm segments associated with the namespace, but we really should do tne shm_init_ns() earlier than we do now. This, together with commit 288d5abec831 ("Boot up with usermodehelper disabled") will mean that we really do initialize the initial ipc namespace data structure before we run any tasks. Tested-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index b5bae9d945b6..02ecf2c078fc 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -105,9 +105,16 @@ void shm_exit_ns(struct ipc_namespace *ns)
105} 105}
106#endif 106#endif
107 107
108void __init shm_init (void) 108static int __init ipc_ns_init(void)
109{ 109{
110 shm_init_ns(&init_ipc_ns); 110 shm_init_ns(&init_ipc_ns);
111 return 0;
112}
113
114pure_initcall(ipc_ns_init);
115
116void __init shm_init (void)
117{
111 ipc_init_proc_interface("sysvipc/shm", 118 ipc_init_proc_interface("sysvipc/shm",
112#if BITS_PER_LONG <= 32 119#if BITS_PER_LONG <= 32
113 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", 120 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n",