aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWedson Almeida Filho <[email protected]>2023-09-30 02:00:32 -0300
committerChristian Brauner <[email protected]>2023-10-10 13:49:20 +0200
commit2f5028604f08fa9fe40c07295843d6917d9d0a94 (patch)
tree7a19106fec85d33e40fe7c000e8f5da554e0afbe
parent3d649a4a832ecfa48bf1f62972c1ddf0030785d3 (diff)
shmem: move shmem_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes to shmem_xattr_handlers at runtime. Cc: Hugh Dickins <[email protected]> Cc: Andrew Morton <[email protected]> Cc: [email protected] Signed-off-by: Wedson Almeida Filho <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r--mm/shmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 02e62fccc80d..fd44902730df 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3714,7 +3714,7 @@ static const struct xattr_handler shmem_user_xattr_handler = {
.set = shmem_xattr_handler_set,
};
-static const struct xattr_handler *shmem_xattr_handlers[] = {
+static const struct xattr_handler * const shmem_xattr_handlers[] = {
&shmem_security_xattr_handler,
&shmem_trusted_xattr_handler,
&shmem_user_xattr_handler,