summaryrefslogtreecommitdiff
path: root/block/blk-softirq.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-11-13 16:17:09 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:20:06 (GMT)
commit01fa1a3cc0c571fa1b2d31ac644841457361cf5f (patch)
treeb06707f31f9eca637ccec2f0e7639c3bd88b32b5 /block/blk-softirq.c
parent5ecad1fddb27507bf1e3bf1935bb7e5b2c8d3c42 (diff)
downloadlinux-fsl-qoriq-01fa1a3cc0c571fa1b2d31ac644841457361cf5f.tar.xz
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 ec9e606..814b3db 100644
--- a/block/blk-softirq.c
+++ b/block/blk-softirq.c
@@ -51,6 +51,7 @@ static void trigger_softirq(void *data)
raise_softirq_irqoff(BLOCK_SOFTIRQ);
local_irq_restore(flags);
+ preempt_check_resched_rt();
}
/*
@@ -93,6 +94,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action,
&__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();
}
/**