diff options
author | David Rientjes <rientjes@google.com> | 2008-06-05 15:57:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-10 06:26:16 -0400 |
commit | 9985b0bab332289f14837eff3c6e0bcc658b58f7 (patch) | |
tree | 8c4bcbc4348c473b14644dc4d371a45c0dabda53 /include/linux/sched.h | |
parent | 7def2be1dc679984f4c4fb3ef19a8a081b2454ec (diff) |
sched: prevent bound kthreads from changing cpus_allowed
Kthreads that have called kthread_bind() are bound to specific cpus, so
other tasks should not be able to change their cpus_allowed from under
them. Otherwise, it is possible to move kthreads, such as the migration
or software watchdog threads, so they are not allowed access to the cpu
they work on.
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Menage <menage@google.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index d25acf600a32..2db1485f865d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1486,6 +1486,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1486 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1486 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
1487 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1487 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
1488 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 1488 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
1489 | #define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */ | ||
1489 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1490 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
1490 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1491 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
1491 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ | 1492 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ |