sched: __sched_setscheduler: read RLIMIT_RTPRIO lockless
PATCH 1/5 sched: __sched_setscheduler: read RLIMIT_RTPRIO 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 <[email protected]>
---
kernel/sched.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
kernel/sched.c renamed from kernel/sched.c~1_SETSCHED_NO_SIGLOCK +2 -6
@@ -4432,12 +4432,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)
[tip:sched/core] sched: __sched_setscheduler: Read the RLIMIT_RTPRIO value lockless
Commit-ID: a44702e8858a071aa0f2365113ea4a2e51c8b575 Gitweb: http://git.kernel.org/tip/a44702e8858a071aa0f2365113ea4a2e51c8b575 Author: Oleg Nesterov <[email protected]> AuthorDate: Fri, 11 Jun 2010 01:09:44 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 18 Jun 2010 10:46:55 +0200
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 <[email protected]>
Signed-off-by Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/sched.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
kernel/sched.c +2 -6
@@ -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)