Skip to content

Commit d412ace

Browse files
rbmarlierehtejun
authored andcommitted
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. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-and-reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent c70e177 commit d412ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/workqueue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6692,7 +6692,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = {
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
};

0 commit comments

Comments
 (0)