summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2025-01-02 13:01:32 +0100
committerJens Axboe <axboe@kernel.dk>2025-01-02 13:20:29 -0700
commit8686e1dedac7190d2f148b23e4f1ac69d2e37d6b (patch)
tree304f9f76596a013dd772f75c76b71ac3ffe1f41b /block
parent044792cda05a97ae1da330771ec2140ae86439ec (diff)
downloadlinux-stable-8686e1dedac7190d2f148b23e4f1ac69d2e37d6b.tar.gz
linux-stable-8686e1dedac7190d2f148b23e4f1ac69d2e37d6b.tar.bz2
linux-stable-8686e1dedac7190d2f148b23e4f1ac69d2e37d6b.zip
block: mq-deadline: Constify sysfs attributes
The elevator core now allows instances of 'struct elv_fs_entry' 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/20250102-sysfs-const-attr-elevator-v1-2-9837d2058c60@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/mq-deadline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 5528347b5fcf..754f6b7415cd 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -834,7 +834,7 @@ STORE_INT(deadline_fifo_batch_store, &dd->fifo_batch, 0, INT_MAX);
#define DD_ATTR(name) \
__ATTR(name, 0644, deadline_##name##_show, deadline_##name##_store)
-static struct elv_fs_entry deadline_attrs[] = {
+static const struct elv_fs_entry deadline_attrs[] = {
DD_ATTR(read_expire),
DD_ATTR(write_expire),
DD_ATTR(writes_starved),