]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ptp: ocp: constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 22 Dec 2024 20:08:20 +0000 (21:08 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Jan 2025 01:10:27 +0000 (17:10 -0800)
commitbe16b46f9ebd3270a4c4da81e5d7bb34b6f43384
treefe4aed7464f88c28747dc21854aba1a866e7d3a9
parentc83ca5a4df7cf0ce9ccc25e8481043e05aed6ad0
ptp: ocp: 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: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20241222-sysfs-const-bin_attr-ptp-v1-1-5c1f3ee246fb@weissschuh.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/ptp/ptp_ocp.c