[PATCH 1/5] sched: __sched_setscheduler: read RLIMIT_RTPRIOlockless
From: Oleg Nesterov
Date: Thu Jun 10 2010 - 19:12:31 EST
__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@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/