summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/xattr.c
diff options
context:
space:
mode:
authorWedson Almeida Filho <walmeida@microsoft.com>2023-09-30 02:00:19 -0300
committerChristian Brauner <brauner@kernel.org>2023-10-09 16:24:19 +0200
commit13a75c3abcbed217e2edaf8c760e603b3f994a04 (patch)
tree7567540fd799b0dccdd011bd3aa422d5e45883ff /fs/jffs2/xattr.c
parent2c323f2c565078557d09768a4ee654ea3f139285 (diff)
downloadlinux-stable-13a75c3abcbed217e2edaf8c760e603b3f994a04.tar.gz
linux-stable-13a75c3abcbed217e2edaf8c760e603b3f994a04.tar.bz2
linux-stable-13a75c3abcbed217e2edaf8c760e603b3f994a04.zip
jffs2: move jffs2_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes to jffs2_xattr_handlers at runtime. Cc: David Woodhouse <dwmw2@infradead.org> Cc: Richard Weinberger <richard@nod.at> Cc: linux-mtd@lists.infradead.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-16-wedsonaf@gmail.com Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/jffs2/xattr.c')
-rw-r--r--fs/jffs2/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index 3b6bdc9a49e1..00224f3a8d6e 100644
--- a/fs/jffs2/xattr.c
+++ b/fs/jffs2/xattr.c
@@ -920,7 +920,7 @@ struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c,
* do_jffs2_setxattr(inode, xprefix, xname, buffer, size, flags)
* is an implementation of setxattr handler on jffs2.
* -------------------------------------------------- */
-const struct xattr_handler *jffs2_xattr_handlers[] = {
+const struct xattr_handler * const jffs2_xattr_handlers[] = {
&jffs2_user_xattr_handler,
#ifdef CONFIG_JFFS2_FS_SECURITY
&jffs2_security_xattr_handler,