diff options
| -rw-r--r-- | kernel/softirq.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 4a3da9be9f26..0e1e1356e35a 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -137,11 +137,17 @@ EXPORT_SYMBOL(do_softirq); void local_bh_enable(void) { - __local_bh_enable(); WARN_ON(irqs_disabled()); - if (unlikely(!in_interrupt() && - local_softirq_pending())) + /* + * Keep preemption disabled until we are done with + * softirq processing: + */ + preempt_count() -= SOFTIRQ_OFFSET - 1; + + if (unlikely(!in_interrupt() && local_softirq_pending())) invoke_softirq(); + + dec_preempt_count(); preempt_check_resched(); } EXPORT_SYMBOL(local_bh_enable); |
