Skip to content

Commit

Permalink
cpumask: don't define set_cpus_allowed() if CONFIG_CPUMASK_OFFSTACK=y
Browse files Browse the repository at this point in the history
You're not supposed to pass cpumasks on the stack in that case.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Sep 24, 2009
1 parent e68110f commit e0ad955
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1817,10 +1817,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
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
Expand Down

0 comments on commit e0ad955

Please sign in to comment.