summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2010-06-11 01:09:44 +0200
committerIngo Molnar <mingo@elte.hu>2010-06-18 10:46:55 +0200
commita44702e8858a071aa0f2365113ea4a2e51c8b575 (patch)
treef43ffdfb4ba51a581b73d5386eac5ccf92584e62
parentb6b12294405e6ec029e627c49adf3193829a2685 (diff)
downloadblackbird-op-linux-a44702e8858a071aa0f2365113ea4a2e51c8b575.tar.gz
blackbird-op-linux-a44702e8858a071aa0f2365113ea4a2e51c8b575.zip
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>
-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:
*/
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)
OpenPOWER on IntegriCloud