History

workqueue: make wq_subsys const

Now that the driver core can properly handle constant struct bus_type, move the wq_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.

Ricardo B. Marliere committed 2 years ago

Commit d412ace1 parent c70e1771 file · +1 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−1
@@ -6692,7 +6692,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = { · 6691 unmodified lines
66926692 __ATTR_NULL,
66936693 };
66946694
6695−static struct bus_type wq_subsys = {
6695+static const struct bus_type wq_subsys = {
66966696 .name = "workqueue",
66976697 .dev_groups = wq_sysfs_groups,
66986698 };