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.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -6692,7 +6692,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = { · 6691 unmodified lines | ||
| 6692 | 6692 | __ATTR_NULL, |
| 6693 | 6693 | }; |
| 6694 | 6694 | |
| 6695 | −static struct bus_type wq_subsys = { | |
| 6695 | +static const struct bus_type wq_subsys = { | |
| 6696 | 6696 | .name = "workqueue", |
| 6697 | 6697 | .dev_groups = wq_sysfs_groups, |
| 6698 | 6698 | }; |