aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2010-06-10 19:09:44 -0400
committerIngo Molnar <mingo@elte.hu>2010-06-18 04:46:55 -0400
commita44702e8858a071aa0f2365113ea4a2e51c8b575 (patch)
treef43ffdfb4ba51a581b73d5386eac5ccf92584e62 /kernel
parentb6b12294405e6ec029e627c49adf3193829a2685 (diff)
sched: __sched_setscheduler: Read the RLIMIT_RTPRIO value lockless
__sched_setscheduler() takes lock_task_sighand() to access task->signal. This is not needed since ea6d290c, ->signal can't go away. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20100610230944.GA25903@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
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)