diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:52 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:20:29 -0400 |
commit | eecee2fcff2aebb029f9f9c979772f05165213f7 (patch) | |
tree | 2767de234a8221a71095ac89a61d8c9d4580f0bf /kernel | |
parent | 3057498a98914c809c58f828fbbd7bc061ee8a6d (diff) |
Block sched_setaffinity() for SCHED_LITMUS tasks
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1fe02e0e801c..8a82c61d83df 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -4113,9 +4113,9 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask) | |||
4113 | rcu_read_lock(); | 4113 | rcu_read_lock(); |
4114 | 4114 | ||
4115 | p = find_process_by_pid(pid); | 4115 | p = find_process_by_pid(pid); |
4116 | if (!p) { | 4116 | if (!p || is_realtime(p)) { |
4117 | rcu_read_unlock(); | 4117 | rcu_read_unlock(); |
4118 | return -ESRCH; | 4118 | return p ? -EPERM : -ESRCH; |
4119 | } | 4119 | } |
4120 | 4120 | ||
4121 | /* Prevent p going away */ | 4121 | /* Prevent p going away */ |