From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754304AbcH3OsP (ORCPT ); Tue, 30 Aug 2016 10:48:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:58064 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbcH3OsO (ORCPT ); Tue, 30 Aug 2016 10:48:14 -0400 Subject: Re: [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen To: Seth Forshee , "Eric W. Biederman" , Boris Ostrovsky , David Vrabel References: <1472483029-135090-1-git-send-email-seth.forshee@canonical.com> Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org From: Juergen Gross Message-ID: <7389d1f8-7d61-fbcc-7e62-3f7e7b6f7e50@suse.com> Date: Tue, 30 Aug 2016 16:48:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <1472483029-135090-1-git-send-email-seth.forshee@canonical.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/08/16 17:03, Seth Forshee wrote: > Mounting proc in user namespace containers fails if the xenbus > filesystem is mounted on /proc/xen because this directory fails > the "permanently empty" test. proc_create_mount_point() exists > specifically to create such mountpoints in proc but is currently > proc-internal. Export this interface to modules, then use it in > xenbus when creating /proc/xen. > > Signed-off-by: Seth Forshee > --- > drivers/xen/xenbus/xenbus_probe.c | 2 +- > fs/proc/generic.c | 1 + > fs/proc/internal.h | 1 - > include/linux/proc_fs.h | 2 ++ > 4 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c > index 33a31cfef55d..b5c1dec4a7c2 100644 > --- a/drivers/xen/xenbus/xenbus_probe.c > +++ b/drivers/xen/xenbus/xenbus_probe.c > @@ -826,7 +826,7 @@ static int __init xenbus_init(void) > * Create xenfs mountpoint in /proc for compatibility with > * utilities that expect to find "xenbus" under "/proc/xen". > */ > - proc_mkdir("xen", NULL); > + proc_create_mount_point("xen"); > #endif > > out_error: > diff --git a/fs/proc/generic.c b/fs/proc/generic.c > index c633476616e0..be014c544d50 100644 > --- a/fs/proc/generic.c > +++ b/fs/proc/generic.c > @@ -477,6 +477,7 @@ struct proc_dir_entry *proc_create_mount_point(const char *name) > } > return ent; > } > +EXPORT_SYMBOL(proc_create_mount_point); EXPORT_SYMBOL_GPL()? Juergen