From 6a44f71b60d2019d64a052ec5d4fb63742e6e8ec Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Thu, 25 Jul 2013 23:00:29 +0200 Subject: Protect LITMUS^RT tasks from re-nicing Assigning a nice value to LITMUS^RT tasks is meaningless. Bail out early. --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 344855ef752d..7eb42c4f9c75 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3762,7 +3762,7 @@ void set_user_nice(struct task_struct *p, long nice) * it wont have any effect on scheduling until the task is * SCHED_FIFO/SCHED_RR: */ - if (task_has_rt_policy(p)) { + if (task_has_rt_policy(p) || is_realtime(p)) { p->static_prio = NICE_TO_PRIO(nice); goto out_unlock; } -- cgit v1.2.2