summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-12-09 00:38:50 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-12-09 00:40:21 -0500
commit6f686574cccc2ef66fb38e41f19cedd81e7b4504 (patch)
tree3ca07460f6dfc6f083ecdb8dbb96e2f525d97696 /ipc
parent905ad269c55fc62bee3da29f7b1d1efeba8aa1e1 (diff)
downloadlinux-3.10-6f686574cccc2ef66fb38e41f19cedd81e7b4504.tar.gz
linux-3.10-6f686574cccc2ef66fb38e41f19cedd81e7b4504.tar.bz2
linux-3.10-6f686574cccc2ef66fb38e41f19cedd81e7b4504.zip
... and the same kind of leak for mqueue
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c8
-rw-r--r--ipc/msgutil.c5
2 files changed, 3 insertions, 10 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 2e0ecfcc881..5b4293d9819 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1269,7 +1269,7 @@ void mq_clear_sbinfo(struct ipc_namespace *ns)
void mq_put_mnt(struct ipc_namespace *ns)
{
- mntput(ns->mq_mnt);
+ kern_unmount(ns->mq_mnt);
}
static int __init init_mqueue_fs(void)
@@ -1291,11 +1291,9 @@ static int __init init_mqueue_fs(void)
spin_lock_init(&mq_lock);
- init_ipc_ns.mq_mnt = kern_mount_data(&mqueue_fs_type, &init_ipc_ns);
- if (IS_ERR(init_ipc_ns.mq_mnt)) {
- error = PTR_ERR(init_ipc_ns.mq_mnt);
+ error = mq_init_ns(&init_ipc_ns);
+ if (error)
goto out_filesystem;
- }
return 0;
diff --git a/ipc/msgutil.c b/ipc/msgutil.c
index 8b5ce5d3f3e..5652101cdac 100644
--- a/ipc/msgutil.c
+++ b/ipc/msgutil.c
@@ -27,11 +27,6 @@ DEFINE_SPINLOCK(mq_lock);
*/
struct ipc_namespace init_ipc_ns = {
.count = ATOMIC_INIT(1),
-#ifdef CONFIG_POSIX_MQUEUE
- .mq_queues_max = DFLT_QUEUESMAX,
- .mq_msg_max = DFLT_MSGMAX,
- .mq_msgsize_max = DFLT_MSGSIZEMAX,
-#endif
.user_ns = &init_user_ns,
};