mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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" <[email protected]>
This commit is contained in:
parent
9c722e406a
commit
df75e7748b
7 changed files with 7 additions and 7 deletions
|
|
@ -2754,7 +2754,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
|
|||
|
||||
ucounts = inc_mnt_namespaces(user_ns);
|
||||
if (!ucounts)
|
||||
return ERR_PTR(-ENFILE);
|
||||
return ERR_PTR(-ENOSPC);
|
||||
|
||||
new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
|
||||
if (!new_ns) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue