tracing: irqsoff: Prevent false-positive lockdep warning
Below warning is observed during boot when lockdep is enabled
due to per-cpu irqsoff_store access. As rcu_read_lock/unlock
can not be called from idle CPU, fix the warning by disabling
lockdep checks before call and enable it after.
[ 0.125185] =============================
[ 0.129317] WARNING: suspicious RCU usage
[ 0.133452] 4.19.12+ #31 Not tainted
[ 0.137130] -----------------------------
[ 0.141263] include/trace/events/preemptirq.h:91 \
suspicious rcu_dereference_check() usage!
[ 0.153137]
[ 0.153137] other info that might help us debug this:
[ 0.153137]
[ 0.161364]
[ 0.161364] RCU used illegally from idle CPU!
[ 0.161364] rcu_scheduler_active = 1, debug_locks = 1
[ 0.172518] RCU used illegally from extended quiescent state!
[ 0.178428] no locks held by swapper/0/0.
[ 0.182560]
[ 0.196994] Call trace:
[ 0.199534] dump_backtrace+0x0/0x190
[ 0.203311] show_stack+0x20/0x30
[ 0.206728] dump_stack+0xe8/0x13c
[ 0.210240] lockdep_rcu_suspicious+0x128/0x150
[ 0.214905] tracer_hardirqs_on+0x1a0/0x458
[ 0.219209] trace_hardirqs_on+0x148/0x1b8
[ 0.223428] arch_cpu_idle+0xf8/0x200
[ 0.227208] do_idle+0xcc/0x2a8
[ 0.230446] cpu_startup_entry+0x24/0x28
[ 0.234485] rest_init+0x1f0/0x200
[ 0.237998] start_kernel+0x434/0x4bc.
Change-Id: I4ae8f57ba965d9263d90030ee938c39479d409ea
Signed-off-by:
Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Loading
Please register or sign in to comment