]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
sched: __sched_setscheduler: Read the RLIMIT_RTPRIO value lockless
authorOleg Nesterov <oleg@redhat.com>
Thu, 10 Jun 2010 23:09:44 +0000 (01:09 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 18 Jun 2010 08:46:55 +0000 (10:46 +0200)
__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>
kernel/sched.c

index 132950b33dde5603a9e585882d97913212cb6bd2..b4427cc70acdca364b917788a31be49ddf25189f 100644 (file)
@@ -4600,12 +4600,8 @@ recheck:
         */
        if (user && !capable(CAP_SYS_NICE)) {
                if (rt_policy(policy)) {
-                       unsigned long rlim_rtprio;
-
-                       if (!lock_task_sighand(p, &flags))
-                               return -ESRCH;
-                       rlim_rtprio = task_rlimit(p, RLIMIT_RTPRIO);
-                       unlock_task_sighand(p, &flags);
+                       unsigned long rlim_rtprio =
+                                       task_rlimit(p, RLIMIT_RTPRIO);
 
                        /* can't set/change the rt policy */
                        if (policy != p->policy && !rlim_rtprio)