[lkml]   [2005]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [patch 1/1] export cpu_online_map
Date wrote:
> - Why isn't set_cpus_allowed() just a no-op on UP? Or some trivial thing
> which tests for cpu #0?

It's still needed to weed out bogus masks that have CPU 0 turned off.

You're right that it doesn't need to check cpu_online_map though.
Here is a patch to make it check for CPU 0 instead.

Signed-off-by: Herbert Xu <>

Visit Openswan at
Email: Herbert Xu ~{PmV>HI~} <>
Home Page:
PGP Key:
diff --git a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -895,7 +895,7 @@ extern int set_cpus_allowed(task_t *p, c
static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
- if (!cpus_intersects(new_mask, cpu_online_map))
+ if (!cpu_isset(0, new_mask))
return -EINVAL;
return 0;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-10-28 04:52    [W:0.038 / U:1.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site