Re: [PATCH] fix (again) MAX_USER_RT_PRIO and MAX_RT_PRIO (was:MAX_USER_RT_PRIO and MAX_RT_PRIO are wrong!)

From: Lee Revell
Date: Mon Jul 25 2005 - 15:41:56 EST


On Mon, 2005-07-25 at 16:28 -0400, Steven Rostedt wrote:
> Ingo,
>
> I've CC you just because you are the schedule maintainer. You already
> accepted this patch into your RT tree.
>

Please make sure to pick up this patch from Andreas Steinmetz too,
otherwise the rlimits are broken:

--- linux.orig/kernel/sched.c 2005-07-22 19:45:05.000000000 +0200
+++ linux/kernel/sched.c 2005-07-22 19:45:42.000000000 +0200
@@ -3528,7 +3528,8 @@
*/
if (!capable(CAP_SYS_NICE)) {
/* can't change policy */
- if (policy != p->policy)
+ if (policy != p->policy &&
+ !p->signal->rlim[RLIMIT_RTPRIO].rlim_cur)
return -EPERM;
/* can't increase priority */
if (policy != SCHED_NORMAL &&

Lee

-
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/