[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241216-sysfs-const-bin_attr-scsi-v1-9-f0a5e54b3437@weissschuh.net>
Date: Mon, 16 Dec 2024 12:29:16 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Adam Radford <aradford@...il.com>,
Bradley Grove <linuxdrivers@...otech.com>,
Tyrel Datwyler <tyreld@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
James Smart <james.smart@...adcom.com>,
Dick Kennedy <dick.kennedy@...adcom.com>, Brian King <brking@...ibm.com>,
Saurav Kashyap <skashyap@...vell.com>, Javed Hasan <jhasan@...vell.com>,
GR-QLogic-Storage-Upstream@...vell.com, Nilesh Javali <njavali@...vell.com>,
Manish Rangankar <mrangankar@...vell.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 09/11] 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 <linux@...ssschuh.net>
---
drivers/scsi/qedi/qedi_dbg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h
index fdda12ef13b0fd1f69103a28b8a9e8641281e151..5a1ec45421834bfed5f7d7b87391ae8cc4905c6e 100644
--- a/drivers/scsi/qedi/qedi_dbg.h
+++ b/drivers/scsi/qedi/qedi_dbg.h
@@ -91,7 +91,7 @@ struct Scsi_Host;
struct sysfs_bin_attrs {
char *name;
- struct bin_attribute *attr;
+ const struct bin_attribute *attr;
};
int qedi_create_sysfs_attr(struct Scsi_Host *shost,
--
2.47.1
Powered by blists - more mailing lists