The code snippet is in linux/kernel/softirq.c:__do_softirq():

==
    do {
        if (pending & 1) {
            int preempt_count = preempt_count();
            h->action(h);
            if (preempt_count != preempt_count()) {
                printk(KERN_CRIT "BUG: softirq: %p, %x,%x\n",
                    h->action, preempt_count, preempt_count());
                dump_crit_stack();
            }
            rcu_bh_qsctr_inc(cpu);

        }
==

What I am trying to understand is the preempt_count check after
h->action(h); statement. Can somebody tell me why such a prempt_count
mismatch check is made and why a mismatch is critical?

Thanks,
-nagp

Reply via email to