Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46458 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726741AbeH0Arb (ORCPT ); Sun, 26 Aug 2018 20:47:31 -0400 From: David Howells In-Reply-To: <20180823223145.GK6515@ZenIV.linux.org.uk> References: <20180823223145.GK6515@ZenIV.linux.org.uk> To: Al Viro Cc: dhowells@redhat.com, Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH] mqueue: Fix bug from mount API conversion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21986.1535317428.1@warthog.procyon.org.uk> Date: Sun, 26 Aug 2018 22:03:48 +0100 Message-ID: <21987.1535317428@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 Signed-off-by: David Howells --- 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;