Skip to contentSkip to conversation

cpumask: don't define set_cpus_allowed() if CONFIG_CPUMASK_OFFSTACK=y

PATCH New Rusty Russell 1 participant 1 message Jun 12, 2009 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 11/17 cpumask: don't define set_cpus_allowed() if CONFIG_CPUMASK_OFFSTACK=y

You're not supposed to pass cpumasks on the stack in that case.

---
 include/linux/sched.h |    3 +++
 1 file changed, 3 insertions(+)
include/linux/sched.h +3 -0
@@ -1682,10 +1682,13 @@ static inline int set_cpus_allowed_ptr(s
 	return 0;
 }
 #endif
+
+#ifndef CONFIG_CPUMASK_OFFSTACK
 static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
 {
 	return set_cpus_allowed_ptr(p, &new_mask);
 }
+#endif
 
 /*
  * Architectures can set this to 1 if they have specified