]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
xenfs: Use proc_create_mount_point() to create /proc/xen
authorSeth Forshee <seth.forshee@canonical.com>
Mon, 14 Nov 2016 11:12:56 +0000 (11:12 +0000)
committerJuergen Gross <jgross@suse.com>
Thu, 17 Nov 2016 12:52:18 +0000 (13:52 +0100)
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>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_probe.c
fs/proc/generic.c
fs/proc/internal.h
include/linux/proc_fs.h

index 33a31cfef55dd407c829f29a8c3b71379442799a..b5c1dec4a7c2d3623f5efc9b8a02d5051797faca 100644 (file)
@@ -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:
index 5f2dc2032c79e2eb62fe6bf0f92062306c53dc3c..7eb3cefcf2a397c74af0ae958c13aa41f52ce7bd 100644 (file)
@@ -479,6 +479,7 @@ struct proc_dir_entry *proc_create_mount_point(const char *name)
        }
        return ent;
 }
+EXPORT_SYMBOL(proc_create_mount_point);
 
 struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
                                        struct proc_dir_entry *parent,
index 5378441ec1b7bccb0c98a6a5ce077be9b4da921f..7de67957211190bd543415c99580c5ec29edf230 100644 (file)
@@ -195,7 +195,6 @@ static inline bool is_empty_pde(const struct proc_dir_entry *pde)
 {
        return S_ISDIR(pde->mode) && !pde->proc_iops;
 }
-struct proc_dir_entry *proc_create_mount_point(const char *name);
 
 /*
  * inode.c
index b97bf2ef996ef3e9e0cf906280741f20365d1455..8bd2f726436aa646169760b772f1cf27aff918a8 100644 (file)
@@ -21,6 +21,7 @@ extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
                                              struct proc_dir_entry *, void *);
 extern struct proc_dir_entry *proc_mkdir_mode(const char *, umode_t,
                                              struct proc_dir_entry *);
+struct proc_dir_entry *proc_create_mount_point(const char *name);
  
 extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
                                               struct proc_dir_entry *,
@@ -56,6 +57,7 @@ static inline struct proc_dir_entry *proc_symlink(const char *name,
                struct proc_dir_entry *parent,const char *dest) { return NULL;}
 static inline struct proc_dir_entry *proc_mkdir(const char *name,
        struct proc_dir_entry *parent) {return NULL;}
+static inline struct proc_dir_entry *proc_create_mount_point(const char *name) { return NULL; }
 static inline struct proc_dir_entry *proc_mkdir_data(const char *name,
        umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; }
 static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,