Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Cc: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20240206-bus_cleanup-workqueue-v1-1-72b10d282d58@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ricardo B. Marliere and committed by
Greg Kroah-Hartman
5df9197e f297a384

+1 -1
+1 -1
kernel/workqueue.c
··· 6157 6157 __ATTR_NULL, 6158 6158 }; 6159 6159 6160 - static struct bus_type wq_subsys = { 6160 + static const struct bus_type wq_subsys = { 6161 6161 .name = "workqueue", 6162 6162 .dev_groups = wq_sysfs_groups, 6163 6163 };