diff options
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index e8afe0919..19e068c65 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -198,10 +198,15 @@ void tasklet_init(struct tasklet_struct *t, void tasklet_kill(struct tasklet_struct *t) { + if (in_interrupt()) + printk("Attempt to kill tasklet from interrupt\n"); + while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { - if (in_interrupt()) - panic("Attempt to kill tasklet from interrupt\n"); - schedule(); + current->state = TASK_RUNNING; + do { + current->policy |= SCHED_YIELD; + schedule(); + } while (test_bit(TASKLET_STATE_SCHED, &t->state)); } tasklet_unlock_wait(t); clear_bit(TASKLET_STATE_SCHED, &t->state); |