summaryrefslogtreecommitdiffstats
path: root/kernel/user.c
diff options
context:
space:
mode:
authorChristian Brauner <christian.brauner@ubuntu.com>2017-10-25 00:04:40 +0200
committerEric W. Biederman <ebiederm@xmission.com>2017-10-31 17:22:58 -0500
commitaa4bf44dc851c6bdd4f7b61b5f2c56c84dfe2ff0 (patch)
treeca3bdc2e66ad9585112fa7a08fd8ce9304f509b8 /kernel/user.c
parente19b205be43d11bff638cad4487008c48d21c103 (diff)
downloadlinux-aa4bf44dc851c6bdd4f7b61b5f2c56c84dfe2ff0.tar.gz
linux-aa4bf44dc851c6bdd4f7b61b5f2c56c84dfe2ff0.tar.bz2
linux-aa4bf44dc851c6bdd4f7b61b5f2c56c84dfe2ff0.zip
userns: use union in {g,u}idmap struct
- Add a struct containing two pointer to extents and wrap both the static extent array and the struct into a union. This is done in preparation for bumping the {g,u}idmap limits for user namespaces. - Add brackets around anonymous union when using designated initializers to initialize members in order to please gcc <= 4.4. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'kernel/user.c')
-rw-r--r--kernel/user.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/kernel/user.c b/kernel/user.c
index 00281add65b2..9a20acce460d 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -26,26 +26,32 @@
struct user_namespace init_user_ns = {
.uid_map = {
.nr_extents = 1,
- .extent[0] = {
- .first = 0,
- .lower_first = 0,
- .count = 4294967295U,
+ {
+ .extent[0] = {
+ .first = 0,
+ .lower_first = 0,
+ .count = 4294967295U,
+ },
},
},
.gid_map = {
.nr_extents = 1,
- .extent[0] = {
- .first = 0,
- .lower_first = 0,
- .count = 4294967295U,
+ {
+ .extent[0] = {
+ .first = 0,
+ .lower_first = 0,
+ .count = 4294967295U,
+ },
},
},
.projid_map = {
.nr_extents = 1,
- .extent[0] = {
- .first = 0,
- .lower_first = 0,
- .count = 4294967295U,
+ {
+ .extent[0] = {
+ .first = 0,
+ .lower_first = 0,
+ .count = 4294967295U,
+ },
},
},
.count = ATOMIC_INIT(3),