aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/msg.c')
-rw-r--r--ipc/msg.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index 32494e8cc7a5..b4eee1c6101d 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -98,20 +98,15 @@ void recompute_msgmni(struct ipc_namespace *ns)
98 98
99 if (allowed < MSGMNI) { 99 if (allowed < MSGMNI) {
100 ns->msg_ctlmni = MSGMNI; 100 ns->msg_ctlmni = MSGMNI;
101 goto out_callback; 101 return;
102 } 102 }
103 103
104 if (allowed > IPCMNI / nb_ns) { 104 if (allowed > IPCMNI / nb_ns) {
105 ns->msg_ctlmni = IPCMNI / nb_ns; 105 ns->msg_ctlmni = IPCMNI / nb_ns;
106 goto out_callback; 106 return;
107 } 107 }
108 108
109 ns->msg_ctlmni = allowed; 109 ns->msg_ctlmni = allowed;
110
111out_callback:
112
113 printk(KERN_INFO "msgmni has been set to %d for ipc namespace %p\n",
114 ns->msg_ctlmni, ns);
115} 110}
116 111
117void msg_init_ns(struct ipc_namespace *ns) 112void msg_init_ns(struct ipc_namespace *ns)
@@ -136,6 +131,10 @@ void msg_exit_ns(struct ipc_namespace *ns)
136void __init msg_init(void) 131void __init msg_init(void)
137{ 132{
138 msg_init_ns(&init_ipc_ns); 133 msg_init_ns(&init_ipc_ns);
134
135 printk(KERN_INFO "msgmni has been set to %d\n",
136 init_ipc_ns.msg_ctlmni);
137
139 ipc_init_proc_interface("sysvipc/msg", 138 ipc_init_proc_interface("sysvipc/msg",
140 " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n", 139 " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n",
141 IPC_MSG_IDS, sysvipc_msg_proc_show); 140 IPC_MSG_IDS, sysvipc_msg_proc_show);