]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/port: Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 14 Jan 2025 21:25:14 +0000 (22:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 08:20:30 +0000 (09:20 +0100)
commit7de24e20a7aa83295e567982b0b29f3b53152759
tree278a585e6f1491d7869652b53dacb13c3613b644
parent1d2d45b62784e81b6e08ec0ab7cca4eaa23ff581
cxl/port: 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: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20250114-sysfs-const-bin_attr-cxl-v1-1-5afa23fe2a52@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cxl/port.c