diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-07-25 16:56:55 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-08-07 03:47:03 -0400 |
commit | 277efe46abaf2c7b49b7b28417bc77ae40445be2 (patch) | |
tree | a00844b64b0656401871103ceaf54cd4419137f8 /kernel | |
parent | 1288313c31e75a5138e4c87901eda10a07ee80ca (diff) |
Don't call set_tsk_need_resched() on remote LITMUS^RT task
This patch fixes a BUG_ON() in litmus/preempt.c:33 reported by Felipe
Cerqueira & Manohar Vanga.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c202f946f54f..344855ef752d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -529,9 +529,14 @@ void resched_task(struct task_struct *p) | |||
529 | if (test_tsk_need_resched(p)) | 529 | if (test_tsk_need_resched(p)) |
530 | return; | 530 | return; |
531 | 531 | ||
532 | set_tsk_need_resched(p); | ||
533 | |||
534 | cpu = task_cpu(p); | 532 | cpu = task_cpu(p); |
533 | |||
534 | /* Cannot call set_tsk_need_resched() on LITMUS^RT task | ||
535 | * on remote core. Only policy plugins may do this via | ||
536 | * litmus_reschedule(). */ | ||
537 | if (!is_realtime(p) || cpu == smp_processor_id()) | ||
538 | set_tsk_need_resched(p); | ||
539 | |||
535 | if (cpu == smp_processor_id()) | 540 | if (cpu == smp_processor_id()) |
536 | return; | 541 | return; |
537 | 542 | ||