diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-01 14:14:52 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-23 09:19:52 +0200 |
| commit | 04fcaedd250ed2213eb65eec40d379c2f275aa02 (patch) | |
| tree | 30b8c182066c7f285cdf0821f18682593fa549da /include | |
| parent | 025756ee7b476241270dd8ccbe17cc4c473800fa (diff) | |
| download | linux-next-04fcaedd250ed2213eb65eec40d379c2f275aa02.tar.gz linux-next-04fcaedd250ed2213eb65eec40d379c2f275aa02.zip | |
fs: make nop_mnt_idmap and invalid_mnt_idmap const
Make both static maps const so they end up in rodata. Any attempt to
modify them now faults instead of silently corrupting the initial
idmapping.
Link: https://patch.msgid.link/20260901-work-idmap-const-v1-27-54ccd48e100b@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Seth Forshee <sforshee@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mnt_idmapping.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mnt_idmapping.h b/include/linux/mnt_idmapping.h index b445c7660040..78eeef4c2996 100644 --- a/include/linux/mnt_idmapping.h +++ b/include/linux/mnt_idmapping.h @@ -8,8 +8,8 @@ struct mnt_idmap; struct user_namespace; -extern struct mnt_idmap nop_mnt_idmap; -extern struct mnt_idmap invalid_mnt_idmap; +extern const struct mnt_idmap nop_mnt_idmap; +extern const struct mnt_idmap invalid_mnt_idmap; extern struct user_namespace init_user_ns; typedef struct { |
