]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: spi-nor: sysfs: constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 22 Dec 2024 20:15:55 +0000 (21:15 +0100)
committerPratyush Yadav <pratyush@kernel.org>
Mon, 13 Jan 2025 17:47:03 +0000 (17:47 +0000)
commit943e5f85600708c348f7b23d3c1cff1cf9763032
tree5f4a0283187210f2815c2e22110946fd0d44ced9
parentb239cbc7b078ff9c8b218c6191550ae28763fdaa
mtd: spi-nor: sysfs: constify 'struct bin_attribute'

The sysfs core now allows instances of 'struct bin_attribute' to be
moved into read-only memory. Make use of that to protect them against
accidental or malicious modifications.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-mtd-v1-1-ee13140a4e9b@weissschuh.net
drivers/mtd/spi-nor/sysfs.c