We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db281d5 commit 686f669Copy full SHA for 686f669
kernel/workqueue.c
@@ -5826,13 +5826,19 @@ static struct device_attribute wq_sysfs_cpumask_attr =
5826
5827
static int __init wq_sysfs_init(void)
5828
{
5829
+ struct device *dev_root;
5830
int err;
5831
5832
err = subsys_virtual_register(&wq_subsys, NULL);
5833
if (err)
5834
return err;
5835
- return device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr);
5836
+ dev_root = bus_get_dev_root(&wq_subsys);
5837
+ if (dev_root) {
5838
+ err = device_create_file(dev_root, &wq_sysfs_cpumask_attr);
5839
+ put_device(dev_root);
5840
+ }
5841
+ return err;
5842
}
5843
core_initcall(wq_sysfs_init);
5844
0 commit comments