Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit dacfd001 authored by Taylor Jackson's avatar Taylor Jackson Committed by Christian Brauner
Browse files

fs/mnt_idmapping.c: Return -EINVAL when no map is written


Currently, it is possible to create an idmapped mount using a user
namespace without any mappings. However, this yields an idmapped
mount that doesn't actually map the ids. With the following change,
it will no longer be possible to create an idmapped mount when using
a user namespace with no mappings, and will instead return EINVAL,
an “invalid argument” error code.

Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarTaylor Jackson <taylor.a.jackson@me.com>
Link: https://lore.kernel.org/r/20240208-mnt-idmap-inval-v2-1-58ef26d194e0@me.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent d31563b5
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment