Skip to contentSkip to conversation

sched/deadline: Fix regression in cpudl_find.

PATCH New Reiter Wolfgang 1 participant 1 message Mar 2, 2014 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/deadline: Fix regression in cpudl_find.

When using CONFIG_FTRACE_SELFTEST=y and CONFIG_FTRACE_STARTUP_TEST=y best_cpu is -1 and passed to function cpumask_check which takes unsigned int.
Fix order of test arguments to avoid oops.
Regression was introduced in commit 82b95800b256205cff2eeab5bbd03430d2d0f20d.

---
 kernel/sched/cpudeadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/cpudeadline.c +1 -1
index 5b8838b..a8571e0 100644
@@ -117,7 +117,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
 	}
 
 out:
-	WARN_ON(!cpu_present(best_cpu) && best_cpu != -1);
+	WARN_ON(best_cpu != -1 && !cpu_present(best_cpu));
 
 	return best_cpu;
 }
Signature · 1 line
1.8.5.3