projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c40f9f6
)
kyber: constify sysfs attributes
author
Thomas Weißschuh
<linux@weissschuh.net>
Thu, 2 Jan 2025 12:01:34 +0000
(13:01 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 2 Jan 2025 20:20:29 +0000
(13:20 -0700)
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-4-9837d2058c60@weissschuh.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/kyber-iosched.c
patch
|
blob
|
history
diff --git
a/block/kyber-iosched.c
b/block/kyber-iosched.c
index
4155594
..
dc31f2d
100644
(file)
--- a/
block/kyber-iosched.c
+++ b/
block/kyber-iosched.c
@@
-889,7
+889,7
@@
KYBER_LAT_SHOW_STORE(KYBER_WRITE, write);
#undef KYBER_LAT_SHOW_STORE
#define KYBER_LAT_ATTR(op) __ATTR(op##_lat_nsec, 0644, kyber_##op##_lat_show, kyber_##op##_lat_store)
-static struct elv_fs_entry kyber_sched_attrs[] = {
+static
const
struct elv_fs_entry kyber_sched_attrs[] = {
KYBER_LAT_ATTR(read),
KYBER_LAT_ATTR(write),
__ATTR_NULL