--- x/kernel/softirq.c +++ y/kernel/softirq.c @@ -517,6 +517,7 @@ static void handle_softirqs(bool ksirqd) bool in_hardirq; __u32 pending; int softirq_bit; + unsigned long lt = 0; /* * Mask out PF_MEMALLOC as the current task context is borrowed for the @@ -542,6 +543,7 @@ restart: while ((softirq_bit = ffs(pending))) { unsigned int vec_nr; int prev_count; + unsigned long t1, t2; h += softirq_bit - 1; @@ -551,7 +553,14 @@ restart: kstat_incr_softirqs_this_cpu(vec_nr); trace_softirq_entry(vec_nr); + t1 = jiffies; h->action(h); + t2 = jiffies; + if (t1 + 2 < t2) + break; + lt += t2 - t1; + if (lt > 200) + break; trace_softirq_exit(vec_nr); if (unlikely(prev_count != preempt_count())) { pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",