... and the same kind of leak for mqueue
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
905ad269c5
commit
6f686574cc
@ -1269,7 +1269,7 @@ void mq_clear_sbinfo(struct ipc_namespace *ns)
|
|||||||
|
|
||||||
void mq_put_mnt(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)
|
static int __init init_mqueue_fs(void)
|
||||||
@ -1291,11 +1291,9 @@ static int __init init_mqueue_fs(void)
|
|||||||
|
|
||||||
spin_lock_init(&mq_lock);
|
spin_lock_init(&mq_lock);
|
||||||
|
|
||||||
init_ipc_ns.mq_mnt = kern_mount_data(&mqueue_fs_type, &init_ipc_ns);
|
error = mq_init_ns(&init_ipc_ns);
|
||||||
if (IS_ERR(init_ipc_ns.mq_mnt)) {
|
if (error)
|
||||||
error = PTR_ERR(init_ipc_ns.mq_mnt);
|
|
||||||
goto out_filesystem;
|
goto out_filesystem;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -27,11 +27,6 @@ DEFINE_SPINLOCK(mq_lock);
|
|||||||
*/
|
*/
|
||||||
struct ipc_namespace init_ipc_ns = {
|
struct ipc_namespace init_ipc_ns = {
|
||||||
.count = ATOMIC_INIT(1),
|
.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,
|
.user_ns = &init_user_ns,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user