Skip to content

Commit 6f68657

Browse files
author
Al Viro
committed
... and the same kind of leak for mqueue
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 905ad26 commit 6f68657

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

‎ipc/mqueue.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ void mq_clear_sbinfo(struct ipc_namespace *ns)
12691269

12701270
void mq_put_mnt(struct ipc_namespace *ns)
12711271
{
1272-
mntput(ns->mq_mnt);
1272+
kern_unmount(ns->mq_mnt);
12731273
}
12741274

12751275
static int __init init_mqueue_fs(void)
@@ -1291,11 +1291,9 @@ static int __init init_mqueue_fs(void)
12911291

12921292
spin_lock_init(&mq_lock);
12931293

1294-
init_ipc_ns.mq_mnt = kern_mount_data(&mqueue_fs_type, &init_ipc_ns);
1295-
if (IS_ERR(init_ipc_ns.mq_mnt)) {
1296-
error = PTR_ERR(init_ipc_ns.mq_mnt);
1294+
error = mq_init_ns(&init_ipc_ns);
1295+
if (error)
12971296
goto out_filesystem;
1298-
}
12991297

13001298
return 0;
13011299

‎ipc/msgutil.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ DEFINE_SPINLOCK(mq_lock);
2727
*/
2828
struct ipc_namespace init_ipc_ns = {
2929
.count = ATOMIC_INIT(1),
30-
#ifdef CONFIG_POSIX_MQUEUE
31-
.mq_queues_max = DFLT_QUEUESMAX,
32-
.mq_msg_max = DFLT_MSGMAX,
33-
.mq_msgsize_max = DFLT_MSGSIZEMAX,
34-
#endif
3530
.user_ns = &init_user_ns,
3631
};
3732

0 commit comments

Comments
 (0)