]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlxbf-bootctl: Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 15 Dec 2024 13:25:40 +0000 (14:25 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 17 Dec 2024 11:13:14 +0000 (13:13 +0200)
commit8ba0e61861ab855d49315c2222844cff4fef467b
tree88bf53a813617dcfb79e365afd70baeac1cfd693
parenta2ec08e43fdb15ffc0bdfe0a8356d0b8e111c505
mlxbf-bootctl: 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>
Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-mellanox-v1-1-b6fe4f68e2ca@weissschuh.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/mellanox/mlxbf-bootctl.c