aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 132950b33dde..b4427cc70acd 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4600,12 +4600,8 @@ recheck:
4600 */ 4600 */
4601 if (user && !capable(CAP_SYS_NICE)) { 4601 if (user && !capable(CAP_SYS_NICE)) {
4602 if (rt_policy(policy)) { 4602 if (rt_policy(policy)) {
4603 unsigned long rlim_rtprio; 4603 unsigned long rlim_rtprio =
4604 4604 task_rlimit(p, RLIMIT_RTPRIO);
4605 if (!lock_task_sighand(p, &flags))
4606 return -ESRCH;
4607 rlim_rtprio = task_rlimit(p, RLIMIT_RTPRIO);
4608 unlock_task_sighand(p, &flags);
4609 4605
4610 /* can't set/change the rt policy */ 4606 /* can't set/change the rt policy */
4611 if (policy != p->policy && !rlim_rtprio) 4607 if (policy != p->policy && !rlim_rtprio)