aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-01-29 20:31:57 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-01-30 14:31:56 -0500
commit904531a6321964579ab0972a8833616e97dbf582 (patch)
tree98c382e81f1d449ceab4e1941771adc1666558f6 /kernel/sched.c
parent3d8eb93db513bd9caa982f27fee8156405fac754 (diff)
bugfix: don't let children stay Litmus real-time tasks
It has always been LITMUS^RT policy that children of real-time tasks may not skip the admissions test, etc. This used to be enforced, but was apparently dropped during some port. This commit re-introduces this policy. This fixes a kernel panic that occurred when "real-time children" exited without proper initilization.
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 1b13c8e1cfc2..5beefb2e7970 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2557,7 +2557,8 @@ void sched_fork(struct task_struct *p, int clone_flags)
2557 * Revert to default priority/policy on fork if requested. 2557 * Revert to default priority/policy on fork if requested.
2558 */ 2558 */
2559 if (unlikely(p->sched_reset_on_fork)) { 2559 if (unlikely(p->sched_reset_on_fork)) {
2560 if (p->policy == SCHED_FIFO || p->policy == SCHED_RR) { 2560 if (p->policy == SCHED_FIFO || p->policy == SCHED_RR ||
2561 p->policy == SCHED_LITMUS) {
2561 p->policy = SCHED_NORMAL; 2562 p->policy = SCHED_NORMAL;
2562 p->normal_prio = p->static_prio; 2563 p->normal_prio = p->static_prio;
2563 } 2564 }