aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:54 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2017-05-26 17:12:36 -0400
commite186efe1e0878778f3874b92b102ac020d165275 (patch)
tree577e819ac558af30af68949b8646ba321bb7bb11
parent2b4c96ec046bd9cf9264466f7b74cd902671d199 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 89a966ee63fc..ef0c6b22045c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3832,7 +3832,7 @@ void set_user_nice(struct task_struct *p, long nice)
3832 * it wont have any effect on scheduling until the task is 3832 * it wont have any effect on scheduling until the task is
3833 * SCHED_DEADLINE, SCHED_FIFO or SCHED_RR: 3833 * SCHED_DEADLINE, SCHED_FIFO or SCHED_RR:
3834 */ 3834 */
3835 if (task_has_dl_policy(p) || task_has_rt_policy(p)) { 3835 if (task_has_dl_policy(p) || task_has_rt_policy(p) || is_realtime(p)) {
3836 p->static_prio = NICE_TO_PRIO(nice); 3836 p->static_prio = NICE_TO_PRIO(nice);
3837 goto out_unlock; 3837 goto out_unlock;
3838 } 3838 }