summaryrefslogtreecommitdiffstats
path: root/kernel/softirq.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r--kernel/softirq.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 6b9b41aa5..de398bcff 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -62,13 +62,14 @@ static inline void run_bottom_halves(void)
asmlinkage void do_bottom_half(void)
{
- int cpu = smp_processor_id();
+ if (softirq_trylock()) {
+ int cpu = smp_processor_id();
- if (hardirq_trylock(cpu)) {
- if (softirq_trylock()) {
+ if (hardirq_trylock(cpu)) {
+ __sti();
run_bottom_halves();
- softirq_endlock();
+ hardirq_endlock(cpu);
}
- hardirq_endlock(cpu);
+ softirq_endlock();
}
}