]> www.infradead.org Git - users/jedix/linux-maple.git/commit
accel/habanalabs: constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 16 Dec 2024 12:25:12 +0000 (13:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 08:20:31 +0000 (09:20 +0100)
commitf800cc58598eb4564cabcc4129d5d1a6f7f598b4
tree3843a4eaa4795fe7bec74ad45e08c6640fedaae4
parent4ab0279857bb0b1c7a1ed61186527e33db693b6e
accel/habanalabs: 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>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-habanalabs-v1-1-b35463197efb@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/accel/habanalabs/common/sysfs.c