[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1624363521-19702-1-git-send-email-neeraju@codeaurora.org>
Date: Tue, 22 Jun 2021 17:35:21 +0530
From: Neeraj Upadhyay <neeraju@...eaurora.org>
To: paulmck@...nel.org, josh@...htriplett.org, rostedt@...dmis.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
joel@...lfernandes.org
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
urezki@...il.com, frederic@...nel.org,
Neeraj Upadhyay <neeraju@...eaurora.org>
Subject: [PATCH] rcu: update: Check rcu_bh_lock_map state in rcu_read_lock_bh_held
In addition to irq and softirq state, check rcu_bh_lock_map
state, to decide whether RCU bh lock is held.
Signed-off-by: Neeraj Upadhyay <neeraju@...eaurora.org>
---
kernel/rcu/update.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index c21b38c..d416f1c 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -333,7 +333,7 @@ int rcu_read_lock_bh_held(void)
if (rcu_read_lock_held_common(&ret))
return ret;
- return in_softirq() || irqs_disabled();
+ return lock_is_held(&rcu_bh_lock_map) || in_softirq() || irqs_disabled();
}
EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Powered by blists - more mailing lists