diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-09-05 16:43:30 +1000 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-09-05 16:43:30 +1000 |
| commit | 91c2beb56b3ab5cf91fe04ddaeb69b90a22b5d36 (patch) | |
| tree | 86dbad225295d8a63048da48728381614c10e1a2 /kernel | |
| parent | 83c93e2bdfe33694032cc6d74e956755dd62e551 (diff) | |
| parent | f2110cb961200e5c382e9d0878ded015109b5dd6 (diff) | |
Merge remote-tracking branch 'agust/next' into next
From Anatolij:
<<
There are cleanups for some mpc5121 specific drivers and DTS files
in preparation to switch mpc5121 clock support to a clock driver
based on common clock framework. Additionally Sebastian fixed the
mpc52xx PIC driver so that it builds when using older gcc versions.
>>
Diffstat (limited to 'kernel')
| -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 6e50a44610ee..9064b919a406 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -62,6 +62,9 @@ int create_user_ns(struct cred *new) kgid_t group = new->egid; int ret; + if (parent_ns->level > 32) + return -EUSERS; + /* * Verify that we can not violate the policy of which files * may be accessed that is specified by the root directory, @@ -92,6 +95,7 @@ int create_user_ns(struct cred *new) atomic_set(&ns->count, 1); /* Leave the new->user_ns reference with the new user namespace. */ ns->parent = parent_ns; + ns->level = parent_ns->level + 1; ns->owner = owner; ns->group = group; |
