diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-10-28 15:21:59 +0000 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2013-06-06 21:28:21 -0400 |
commit | 311da81219db3ed4698d43902c26a070dcb94ac9 (patch) | |
tree | 614c45c3dffac4538f9d87c690f3573d95e99bc2 | |
parent | 245b5b52899cc9a695441b1d905e66c12cbe1059 (diff) |
softirq: Add more debugging
We really want to find code which calls __raise_softirq_irqsoff() and
runs neither in hardirq context nor in a local_bh disabled
region. This is even wrong on mainline as that code relies on random
events to take care of it's newly raised softirq.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/softirq.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index c08332de2807..7880b183e805 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -618,7 +618,7 @@ void thread_do_softirq(void) } } -void __raise_softirq_irqoff(unsigned int nr) +static void do_raise_softirq_irqoff(unsigned int nr) { trace_softirq_raise(nr); or_softirq_pending(1UL << nr); @@ -635,12 +635,19 @@ void __raise_softirq_irqoff(unsigned int nr) __this_cpu_read(ksoftirqd)->softirqs_raised |= (1U << nr); } +void __raise_softirq_irqoff(unsigned int nr) +{ + do_raise_softirq_irqoff(nr); + if (!in_irq() && !current->softirq_nestcnt) + wakeup_softirqd(); +} + /* * This function must run with irqs disabled! */ void raise_softirq_irqoff(unsigned int nr) { - __raise_softirq_irqoff(nr); + do_raise_softirq_irqoff(nr); /* * If we're in an hard interrupt we let irq return code deal @@ -662,11 +669,6 @@ void raise_softirq_irqoff(unsigned int nr) wakeup_softirqd(); } -void do_raise_softirq_irqoff(unsigned int nr) -{ - raise_softirq_irqoff(nr); -} - static inline int ksoftirqd_softirq_pending(void) { return current->softirqs_raised; |