All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: dhowells@redhat.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org
Subject: [PATCH] mqueue: Fix bug from mount API conversion
Date: Sun, 26 Aug 2018 22:03:48 +0100	[thread overview]
Message-ID: <21987.1535317428@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180823223145.GK6515@ZenIV.linux.org.uk>

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>
---
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;

  parent reply	other threads:[~2018-08-27  0:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 22:31 [git pull] new mount API Al Viro
2018-08-23 23:24 ` Andy Lutomirski
2018-08-24  0:08 ` David Howells
2018-08-24  0:16   ` Andy Lutomirski
2018-08-24  0:31     ` Al Viro
2018-08-24  2:36       ` Andy Lutomirski
2018-08-24  3:13         ` Al Viro
2018-08-24  4:51           ` Andy Lutomirski
2018-08-24  6:05             ` Theodore Y. Ts'o
2018-08-24  8:38               ` Miklos Szeredi
2018-08-24  8:56                 ` Miklos Szeredi
2018-08-24  9:29                   ` Miklos Szeredi
2018-08-24  9:45               ` David Howells
2018-08-24 10:06                 ` Miklos Szeredi
2018-08-24 14:18                 ` Miklos Szeredi
2018-08-24 14:26                   ` Karel Zak
2018-08-24 14:26                 ` David Howells
2018-08-24 14:30                   ` Miklos Szeredi
2018-08-24 14:49                 ` Andy Lutomirski
2018-08-24 15:02                   ` Miklos Szeredi
2018-08-24 15:09                     ` Andy Lutomirski
2018-08-24 17:08                       ` Miklos Szeredi
2018-08-24 17:10                     ` David Howells
2018-08-24 17:43                       ` Andy Lutomirski
2018-08-24 19:25                         ` Miklos Szeredi
2018-08-24 19:51                           ` Al Viro
2018-08-29 12:32                             ` Miklos Szeredi
2018-08-26  3:22 ` Eric W. Biederman
2018-08-26 20:42 ` David Howells
2018-08-26 20:46 ` David Howells
2018-08-26 21:03 ` David Howells [this message]
2018-08-26 21:22   ` [PATCH] mqueue: Fix bug from mount API conversion Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21987.1535317428@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.