]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: core: sysfs: Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 22 Dec 2024 20:12:13 +0000 (21:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2024 07:56:04 +0000 (08:56 +0100)
commitaa13b9d5ae2597a08703cf9aa4b0907d09407888
tree0ccf04bd8ddac09c05cd3c47ae28655bf05f4722
parentca5d736b74cacbfd7adf1d792e4ad5b97c6c56c8
usb: core: 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>
Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-usb-v1-1-19a137c0f20a@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/sysfs.c