diff options
-rw-r--r-- | kernel/sched/debug.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 0c5ec2776ddf..7e08e3d947c2 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -388,6 +388,13 @@ void update_sched_domain_debugfs(void) { int cpu, i; + /* + * This can unfortunately be invoked before sched_debug_init() creates + * the debug directory. Don't touch sd_sysctl_cpus until then. + */ + if (!debugfs_sched) + return; + if (!cpumask_available(sd_sysctl_cpus)) { if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL)) return; |