diff mbox series

mqueue: Fix bug from mount API conversion

Message ID 21987.1535317428@warthog.procyon.org.uk (mailing list archive)
State New, archived
Headers show
Series mqueue: Fix bug from mount API conversion | expand

Commit Message

David Howells Aug. 26, 2018, 9:03 p.m. UTC
Hi Al, Linus,

I *think* the attached patch is needed with the new mount API.

David
---
mqueue: Fix bug from mount API conversion

Fix a possible bug from the mount API conversion of the mqueue filesystem
whereby mq_init_ns() passes the root IPC namespace to mq_create_mount()
rather than the namespace passed in.

I don't know if this is the bug Eric is reporting since he didn't give any
details.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---

Comments

Al Viro Aug. 26, 2018, 9:22 p.m. UTC | #1
On Sun, Aug 26, 2018 at 10:03:48PM +0100, David Howells wrote:
> Hi Al, Linus,
> 
> I *think* the attached patch is needed with the new mount API.
> 
> David
> ---
> mqueue: Fix bug from mount API conversion
> 
> Fix a possible bug from the mount API conversion of the mqueue filesystem
> whereby mq_init_ns() passes the root IPC namespace to mq_create_mount()
> rather than the namespace passed in.
> 
> I don't know if this is the bug Eric is reporting since he didn't give any
> details.

Applied and pushed.
diff mbox series

Patch

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 0f102210f89e..4fbbd6f5b588 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1618,7 +1618,7 @@  int mq_init_ns(struct ipc_namespace *ns)
 	ns->mq_msg_default   = DFLT_MSG;
 	ns->mq_msgsize_default  = DFLT_MSGSIZE;
 
-	m = mq_create_mount(&init_ipc_ns);
+	m = mq_create_mount(ns);
 	if (IS_ERR(m))
 		return PTR_ERR(m);
 	ns->mq_mnt = m;