[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240206-bus_cleanup-workqueue-v1-1-72b10d282d58@marliere.net>
Date: Tue, 06 Feb 2024 15:05:06 -0300
From: "Ricardo B. Marliere" <ricardo@...liere.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Tejun Heo <tj@...nel.org>, Lai Jiangshan <jiangshanlai@...il.com>,
linux-kernel@...r.kernel.org, "Ricardo B. Marliere" <ricardo@...liere.net>
Subject: [PATCH] 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@...uxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@...liere.net>
---
The maintainer asked [1] for this patch to be received through the
driver-core tree.
[1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 76e60faed892..f1e062acd091 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -6157,7 +6157,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = {
__ATTR_NULL,
};
-static struct bus_type wq_subsys = {
+static const struct bus_type wq_subsys = {
.name = "workqueue",
.dev_groups = wq_sysfs_groups,
};
---
base-commit: f297a3844aa059c53be3f69be85ebc071b8a6d16
change-id: 20240206-bus_cleanup-workqueue-1547a46532d1
Best regards,
--
Ricardo B. Marliere <ricardo@...liere.net>
Powered by blists - more mailing lists