[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100610230944.GA25903@redhat.com>
Date: Fri, 11 Jun 2010 01:09:44 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <peterz@...radead.org>,
Stanislaw Gruszka <sgruszka@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: [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 <oleg@...hat.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists