summaryrefslogtreecommitdiffstats
path: root/kernel/utsname.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-09-22 13:08:36 -0500
committerEric W. Biederman <ebiederm@xmission.com>2016-09-22 13:25:56 -0500
commitdf75e7748bae1c7098bfa358485389b897f71305 (patch)
tree90b7cdeced0ec6fd9a1543826a5850611c441671 /kernel/utsname.c
parent9c722e406a64db181f6a7b53a19a58fe61501f99 (diff)
downloadlinux-df75e7748bae1c7098bfa358485389b897f71305.tar.gz
linux-df75e7748bae1c7098bfa358485389b897f71305.tar.bz2
linux-df75e7748bae1c7098bfa358485389b897f71305.zip
userns: When the per user per user namespace limit is reached return ENOSPC
The current error codes returned when a the per user per user namespace limit are hit (EINVAL, EUSERS, and ENFILE) are wrong. I asked for advice on linux-api and it we made clear that those were the wrong error code, but a correct effor code was not suggested. The best general error code I have found for hitting a resource limit is ENOSPC. It is not perfect but as it is unambiguous it will serve until someone comes up with a better error code. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/utsname.c')
-rw-r--r--kernel/utsname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/utsname.c b/kernel/utsname.c
index f3b0bb4ac3ba..35587b76faa3 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -49,7 +49,7 @@ static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns,
struct ucounts *ucounts;
int err;
- err = -ENFILE;
+ err = -ENOSPC;
ucounts = inc_uts_namespaces(user_ns);
if (!ucounts)
goto fail;