Skip to content

Commit f9d0a84

Browse files
t-8chmartinkpetersen
authored andcommitted
scsi: qedi: 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 <[email protected]> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-9-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <[email protected]>
1 parent a8116aa commit f9d0a84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/qedi/qedi_dbg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct Scsi_Host;
9191

9292
struct sysfs_bin_attrs {
9393
char *name;
94-
struct bin_attribute *attr;
94+
const struct bin_attribute *attr;
9595
};
9696

9797
int qedi_create_sysfs_attr(struct Scsi_Host *shost,

0 commit comments

Comments
 (0)