Need some help in interpreting a code snippet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux