aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/xattr.c
diff options
context:
space:
mode:
authorWedson Almeida Filho <walmeida@microsoft.com>2023-09-30 02:00:09 -0300
committerChristian Brauner <brauner@kernel.org>2023-10-09 16:24:17 +0200
commit8a25b4189896411136fcce5f271673f6239725ba (patch)
tree36f6a94661d6f335759b6e7753fe66ed7d5eebd5 /fs/btrfs/xattr.c
parentf710c2e4813559e84fb2deb9f36ff43f0ebdf94e (diff)
btrfs: move btrfs_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes to btrfs_xattr_handlers at runtime. Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <josef@toxicpanda.com> Cc: David Sterba <dsterba@suse.com> Cc: linux-btrfs@vger.kernel.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-6-wedsonaf@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r--fs/btrfs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 96828a13dd43..a9f8b173a99f 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -442,7 +442,7 @@ static const struct xattr_handler btrfs_btrfs_xattr_handler = {
.set = btrfs_xattr_handler_set_prop,
};
-const struct xattr_handler *btrfs_xattr_handlers[] = {
+const struct xattr_handler * const btrfs_xattr_handlers[] = {
&btrfs_security_xattr_handler,
&btrfs_trusted_xattr_handler,
&btrfs_user_xattr_handler,