diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:54 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:20:33 -0400 |
commit | 7ee05297e8dd04b4b0bbd34966f9d235211ada2b (patch) | |
tree | 312802cde1d4edde41c56bc8fe27e0bac2840977 | |
parent | 2720985a7f2141baed0fcf97f3ffddbf25442d9d (diff) |
Protect LITMUS^RT tasks from re-nicing
Assigning a nice value to LITMUS^RT tasks is meaningless. Bail out
early.
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index fc59abe463e8..13e6056cffbe 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -3168,7 +3168,7 @@ void set_user_nice(struct task_struct *p, long nice) | |||
3168 | * it wont have any effect on scheduling until the task is | 3168 | * it wont have any effect on scheduling until the task is |
3169 | * SCHED_DEADLINE, SCHED_FIFO or SCHED_RR: | 3169 | * SCHED_DEADLINE, SCHED_FIFO or SCHED_RR: |
3170 | */ | 3170 | */ |
3171 | if (task_has_dl_policy(p) || task_has_rt_policy(p)) { | 3171 | if (task_has_dl_policy(p) || task_has_rt_policy(p) || is_realtime(p)) { |
3172 | p->static_prio = NICE_TO_PRIO(nice); | 3172 | p->static_prio = NICE_TO_PRIO(nice); |
3173 | goto out_unlock; | 3173 | goto out_unlock; |
3174 | } | 3174 | } |