Skip to content

Commit 2f50286

Browse files
wedsonafbrauner
authored andcommitted
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 <hughd@google.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-29-wedsonaf@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 3d649a4 commit 2f50286

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/shmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3714,7 +3714,7 @@ static const struct xattr_handler shmem_user_xattr_handler = {
37143714
.set = shmem_xattr_handler_set,
37153715
};
37163716

3717-
static const struct xattr_handler *shmem_xattr_handlers[] = {
3717+
static const struct xattr_handler * const shmem_xattr_handlers[] = {
37183718
&shmem_security_xattr_handler,
37193719
&shmem_trusted_xattr_handler,
37203720
&shmem_user_xattr_handler,

0 commit comments

Comments
 (0)