* [PATCH 1/5] sched: __sched_setscheduler: read RLIMIT_RTPRIO lockless
@ 2010-06-10 23:09 Oleg Nesterov
2010-06-18 10:19 ` [tip:sched/core] sched: __sched_setscheduler: Read the RLIMIT_RTPRIO value lockless tip-bot for Oleg Nesterov
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2010-06-10 23:09 UTC (permalink / raw)
To: Ingo Molnar
Cc: Peter Zijlstra, Stanislaw Gruszka, Thomas Gleixner, linux-kernel
__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>
---
kernel/sched.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- 35-rc2/kernel/sched.c~1_SETSCHED_NO_SIGLOCK 2010-06-11 00:47:36.000000000 +0200
+++ 35-rc2/kernel/sched.c 2010-06-11 01:07:15.000000000 +0200
@@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:sched/core] sched: __sched_setscheduler: Read the RLIMIT_RTPRIO value lockless
2010-06-10 23:09 [PATCH 1/5] sched: __sched_setscheduler: read RLIMIT_RTPRIO lockless Oleg Nesterov
@ 2010-06-18 10:19 ` tip-bot for Oleg Nesterov
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Oleg Nesterov @ 2010-06-18 10:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, a.p.zijlstra, oleg, tglx, mingo
Commit-ID: a44702e8858a071aa0f2365113ea4a2e51c8b575
Gitweb: http://git.kernel.org/tip/a44702e8858a071aa0f2365113ea4a2e51c8b575
Author: Oleg Nesterov <oleg@redhat.com>
AuthorDate: Fri, 11 Jun 2010 01:09:44 +0200
Committer: Ingo Molnar <mingo@elte.hu>
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 <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 | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 132950b..b4427cc 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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-18 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 23:09 [PATCH 1/5] sched: __sched_setscheduler: read RLIMIT_RTPRIO lockless Oleg Nesterov
2010-06-18 10:19 ` [tip:sched/core] sched: __sched_setscheduler: Read the RLIMIT_RTPRIO value lockless tip-bot for Oleg Nesterov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.