X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=kernel%2Fsoftirq.c;h=787b3a032429a7a88321caf473f6f0e75d12da87;hb=483a53b310dfefdd8c010ba0cc5b2addfaef123f;hp=3d6833f125d307214bae0210bd68cbaaa925755d;hpb=3ad2e318a24124c53cc6390b5bfbd7613d9c2145;p=firefly-linux-kernel-4.4.55.git diff --git a/kernel/softirq.c b/kernel/softirq.c index 3d6833f125d3..787b3a032429 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -330,10 +330,19 @@ void irq_enter(void) static inline void invoke_softirq(void) { - if (!force_irqthreads) - __do_softirq(); - else + if (!force_irqthreads) { + /* + * We can safely execute softirq on the current stack if + * it is the irq stack, because it should be near empty + * at this stage. But we have no way to know if the arch + * calls irq_exit() on the irq stack. So call softirq + * in its own stack to prevent from any overrun on top + * of a potentially deep task stack. + */ + do_softirq(); + } else { wakeup_softirqd(); + } } static inline void tick_irq_exit(void)