[PATCH] safty check of MAX_RT_PRIO >= MAX_USER_RT_PRIO

From: Steven Rostedt
Date: Wed Jul 27 2005 - 09:50:45 EST

On Wed, 2005-07-27 at 16:33 +0200, Ingo Molnar wrote:
> i'm not excluding that this will become necessary in the future. We
> should also add the safety check to sched.h - all i'm suggesting is to
> not make it a .config option just now, because that tends to be fiddled
> with.

So Ingo, would you agree that at least this patch should go in?

-- Steve

(Patched against

Index: vanilla_kernel/include/linux/sched.h
--- vanilla_kernel/include/linux/sched.h (revision 263)
+++ vanilla_kernel/include/linux/sched.h (working copy)
@@ -392,6 +392,10 @@
#define MAX_USER_RT_PRIO 100

+#error MAX_USER_RT_PRIO must not be greater than MAX_RT_PRIO
#define MAX_PRIO (MAX_RT_PRIO + 40)

#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO))

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/