Commit 3ed04e3f authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Frederic Weisbecker
Browse files

rcu: Mark diagnostic functions as notrace



The rcu_lockdep_current_cpu_online(), rcu_read_lock_sched_held(),
rcu_read_lock_held(), rcu_read_lock_bh_held(), rcu_read_lock_any_held()
are used by tracing-related code paths, so putting traces on them is
unlikely to make anyone happy.  This commit therefore marks them all
"notrace".

Reported-by: default avatarLeon Hwang <leon.hwang@linux.dev>
Reported-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
parent 8c8250ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4021,7 +4021,7 @@ bool rcu_cpu_online(int cpu)
 * RCU on an offline processor during initial boot, hence the check for
 * rcu_scheduler_fully_active.
 */
bool rcu_lockdep_current_cpu_online(void)
bool notrace rcu_lockdep_current_cpu_online(void)
{
	struct rcu_data *rdp;
	bool ret = false;
+4 −4
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static bool rcu_read_lock_held_common(bool *ret)
	return false;
}

int rcu_read_lock_sched_held(void)
int notrace rcu_read_lock_sched_held(void)
{
	bool ret;

@@ -342,7 +342,7 @@ EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled);
 * Note that rcu_read_lock() is disallowed if the CPU is either idle or
 * offline from an RCU perspective, so check for those as well.
 */
int rcu_read_lock_held(void)
int notrace rcu_read_lock_held(void)
{
	bool ret;

@@ -367,7 +367,7 @@ EXPORT_SYMBOL_GPL(rcu_read_lock_held);
 * Note that rcu_read_lock_bh() is disallowed if the CPU is either idle or
 * offline from an RCU perspective, so check for those as well.
 */
int rcu_read_lock_bh_held(void)
int notrace rcu_read_lock_bh_held(void)
{
	bool ret;

@@ -377,7 +377,7 @@ int rcu_read_lock_bh_held(void)
}
EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);

int rcu_read_lock_any_held(void)
int notrace rcu_read_lock_any_held(void)
{
	bool ret;