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

Commit c5fdcec9 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Paul E. McKenney
Browse files

lockdep: Add CPU-idle/offline warning to lockdep-RCU splat



It is illegal to use RCU from a CPU that has reported idleness or
offlinedness to RCU.  However, it can be quite difficult to determine
from a stack trace whether or not a given CPU is idle or offline.
Therefore, this commit adds idle/offline diagnostics to the lockdep-RCU
error message.

Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent c0cfbbb0
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -4176,7 +4176,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
	printk("-------------------------------\n");
	printk("-------------------------------\n");
	printk("%s:%d %s!\n", file, line, s);
	printk("%s:%d %s!\n", file, line, s);
	printk("\nother info that might help us debug this:\n\n");
	printk("\nother info that might help us debug this:\n\n");
	printk("\nrcu_scheduler_active = %d, debug_locks = %d\n", rcu_scheduler_active, debug_locks);
	printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
	       !rcu_lockdep_current_cpu_online()
			? "RCU used illegally from offline CPU!\n"
			: rcu_is_cpu_idle()
				? "RCU used illegally from idle CPU!\n"
				: "",
	       rcu_scheduler_active, debug_locks);


	/*
	/*
	 * If a CPU is in the RCU-free window in idle (ie: in the section
	 * If a CPU is in the RCU-free window in idle (ie: in the section