]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/user_namespace.c
UBUNTU: [Config] CONFIG_QCA7000_SPI=m
[mirror_ubuntu-artful-kernel.git] / kernel / user_namespace.c
index 86b7854fec8ee0df88e3bf7d499859993915b8c0..da3fefe632e2327ac3e3460a359a5fd1edb96cda 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/export.h>
 #include <linux/nsproxy.h>
 #include <linux/slab.h>
+#include <linux/sched/signal.h>
 #include <linux/user_namespace.h>
 #include <linux/proc_ns.h>
 #include <linux/highuid.h>
 #include <linux/projid.h>
 #include <linux/fs_struct.h>
 
+/*
+ * sysctl determining whether unprivileged users may unshare a new
+ * userns.  Allowed by default
+ */
+int unprivileged_userns_clone = 1;
+
 static struct kmem_cache *user_ns_cachep __read_mostly;
 static DEFINE_MUTEX(userns_state_mutex);
 
@@ -542,8 +549,10 @@ static void *m_start(struct seq_file *seq, loff_t *ppos,
        struct uid_gid_extent *extent = NULL;
        loff_t pos = *ppos;
 
-       if (pos < map->nr_extents)
+       if (pos < map->nr_extents) {
+               osb();
                extent = &map->extent[pos];
+       }
 
        return extent;
 }
@@ -997,6 +1006,7 @@ bool current_in_userns(const struct user_namespace *target_ns)
        }
        return false;
 }
+EXPORT_SYMBOL(current_in_userns);
 
 static inline struct user_namespace *to_user_ns(struct ns_common *ns)
 {