Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e85b4b5 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

softirqs, debug: preemption check



if a preempt count leaks out of a softirq handler it can be very hard
to figure it out. Add a debug check for this.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 978b0116
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -205,7 +205,18 @@ restart:

	do {
		if (pending & 1) {
			int prev_count = preempt_count();

			h->action(h);

			if (unlikely(prev_count != preempt_count())) {
				printk(KERN_ERR "huh, entered sotfirq %ld %p"
				       "with preempt_count %08x,"
				       " exited with %08x?\n", h - softirq_vec,
				       h->action, prev_count, preempt_count());
				preempt_count() = prev_count;
			}

			rcu_bh_qsctr_inc(cpu);
		}
		h++;