Skip to content

Commit

Permalink
... and the same kind of leak for mqueue
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Dec 9, 2011
1 parent 905ad26 commit 6f68657
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
8 changes: 3 additions & 5 deletions ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;

Expand Down
5 changes: 0 additions & 5 deletions ipc/msgutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit 6f68657

Please sign in to comment.