PCI/P2PDMA: Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 2 Dec 2024 19:02:59 +0000 (20:02 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 3 Dec 2024 21:29:59 +0000 (15:29 -0600)
commit35fdb302caab92f7ee998ff428b0f41c2c3a45f7
tree1a37016348f1e3be943a7c3e563ba02f630a24c9
parent3c39919a5f3d65abff031a7d9acd3b5f5672eec7
PCI/P2PDMA: 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.

Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pci-v1-3-c32360f495a7@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/pci/p2pdma.c