diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2025-01-02 13:01:33 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-02 13:20:29 -0700 |
commit | c40f9f6ac59f949b6cbf10903fa2aae76efffa20 (patch) | |
tree | 5fa29d91d478026e2ce1006df4cdb732e5a58b9c | |
parent | 8686e1dedac7190d2f148b23e4f1ac69d2e37d6b (diff) |
block, bfq: 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-3-9837d2058c60@weissschuh.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/bfq-iosched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 95dd7b795935..068c63e95738 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -7614,7 +7614,7 @@ static ssize_t bfq_low_latency_store(struct elevator_queue *e, #define BFQ_ATTR(name) \ __ATTR(name, 0644, bfq_##name##_show, bfq_##name##_store) -static struct elv_fs_entry bfq_attrs[] = { +static const struct elv_fs_entry bfq_attrs[] = { BFQ_ATTR(fifo_expire_sync), BFQ_ATTR(fifo_expire_async), BFQ_ATTR(back_seek_max), |