aboutsummaryrefslogtreecommitdiff
path: root/block/blk-softirq.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-11-13 17:17:09 +0100
committerSteven Rostedt <rostedt@goodmis.org>2012-04-10 14:34:21 -0400
commit720092c8a1f98c370d01d6cc48187cdc45f84d16 (patch)
tree5b49f0aa4e8e2e24ab87364e98d5f84c8338e451 /block/blk-softirq.c
parent066440b39c00dc9013ee8fbe5571bed2b2dfca6d (diff)
softirq: Check preemption after reenabling interrupts
raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, so the execution of the softirq thread might be delayed arbitrarily. In principle we could add that check to local_irq_enable/restore, but that's overkill as the rasie_softirq_irqoff() sections are the only ones which show this behaviour. Reported-by: Carsten Emde <cbe@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'block/blk-softirq.c')
-rw-r--r--block/blk-softirq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-softirq.c b/block/blk-softirq.c
index 1366a89d8e66..60a88ab5f19e 100644
--- a/block/blk-softirq.c
+++ b/block/blk-softirq.c
@@ -50,6 +50,7 @@ static void trigger_softirq(void *data)
raise_softirq_irqoff(BLOCK_SOFTIRQ);
local_irq_restore(flags);
+ preempt_check_resched_rt();
}
/*
@@ -92,6 +93,7 @@ static int __cpuinit blk_cpu_notify(struct notifier_block *self,
&__get_cpu_var(blk_cpu_done));
raise_softirq_irqoff(BLOCK_SOFTIRQ);
local_irq_enable();
+ preempt_check_resched_rt();
}
return NOTIFY_OK;
@@ -150,6 +152,7 @@ do_local:
goto do_local;
local_irq_restore(flags);
+ preempt_check_resched_rt();
}
/**