diff options
| author | Olof Johansson <olof@lixom.net> | 2013-04-02 10:59:15 -0700 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2013-04-02 10:59:28 -0700 |
| commit | c2573077dfacebdf58f69c666e8f15e9528e5a12 (patch) | |
| tree | e2a6b24366a6b8d75e5b885d82ed25a11da35317 /kernel/user_namespace.c | |
| parent | 46f101df788b38fafa08e85dcbf85d3bff6c1ea3 (diff) | |
| parent | c0114709ed85a5693eb74acdfa03d94f7f12e5b8 (diff) | |
| download | olio-linux-3.10-c2573077dfacebdf58f69c666e8f15e9528e5a12.tar.xz olio-linux-3.10-c2573077dfacebdf58f69c666e8f15e9528e5a12.zip | |
Merge branch 'gic' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 into next/cleanup
* 'gic' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
irqchip: gic: Call handle_bad_irq() directly
arm: Move chained_irq_(enter|exit) to a generic file
arm: Move the set_handle_irq and handle_arch_irq declarations to asm/irq.h
+ Linux 3.9-rc3
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'kernel/user_namespace.c')
| -rw-r--r-- | kernel/user_namespace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 8b650837083..b14f4d34204 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -21,6 +21,7 @@ #include <linux/uaccess.h> #include <linux/ctype.h> #include <linux/projid.h> +#include <linux/fs_struct.h> static struct kmem_cache *user_ns_cachep __read_mostly; @@ -837,6 +838,9 @@ static int userns_install(struct nsproxy *nsproxy, void *ns) if (atomic_read(¤t->mm->mm_users) > 1) return -EINVAL; + if (current->fs->users != 1) + return -EINVAL; + if (!ns_capable(user_ns, CAP_SYS_ADMIN)) return -EPERM; |