Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472527

Re: [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen

From Juergen Gross <jgross@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen
Date 2016-08-30 16:50 +0200
Message-ID <sbSwp-6aZ-7@gated-at.bofh.it> (permalink)
References <sbwme-rU-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <seth.forshee@canonical.com>
> ---
>  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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen Seth Forshee <seth.forshee@canonical.com> - 2016-08-29 17:10 +0200
  Re: [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen Juergen Gross <jgross@suse.com> - 2016-08-30 16:50 +0200
    Re: [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen Seth Forshee <seth.forshee@canonical.com> - 2016-08-30 17:10 +0200
  Re: [Xen-devel] [PATCH] xenbus: Use proc_create_mount_point() to  create /proc/xen David Vrabel <david.vrabel@citrix.com> - 2016-08-30 17:10 +0200
    Re: [Xen-devel] [PATCH] xenbus: Use proc_create_mount_point() to  create /proc/xen Seth Forshee <seth.forshee@canonical.com> - 2016-08-30 17:20 +0200
      Re: [Xen-devel] [PATCH] xenbus: Use proc_create_mount_point() to  create /proc/xen David Vrabel <david.vrabel@citrix.com> - 2016-08-30 17:20 +0200

csiph-web