X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=kernel%2Fsoftirq.c;h=dcab1d3fb53d284cc42da1e36c6e5d001cd5baa9;hb=37bf06375c90a42fe07b9bebdb07bc316ae5a0ce;hp=3e88612fc87e382b65663a3ffd6f13d0c27f2fb7;hpb=6bfa687c19b7ab8adee03f0d43c197c2945dd869;p=firefly-linux-kernel-4.4.55.git diff --git a/kernel/softirq.c b/kernel/softirq.c index 3e88612fc87e..dcab1d3fb53d 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -328,10 +328,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)