[<prev] [next>] [day] [month] [year] [list]
Message-ID: <161503167413.398.1632860817242028005.tip-bot2@tip-bot2>
Date: Sat, 06 Mar 2021 11:54:34 -0000
From: "tip-bot2 for Shuah Khan" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Shuah Khan <skhan@...uxfoundation.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Kalle Valo <kvalo@...eaurora.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: locking/core] ath10k: Detect conf_mutex held ath10k_drain_tx() calls
The following commit has been merged into the locking/core branch of tip:
Commit-ID: bdb1050ee1faaec1e78c15de8b1959176f26c655
Gitweb: https://git.kernel.org/tip/bdb1050ee1faaec1e78c15de8b1959176f26c655
Author: Shuah Khan <skhan@...uxfoundation.org>
AuthorDate: Fri, 26 Feb 2021 17:07:00 -07:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Sat, 06 Mar 2021 12:51:15 +01:00
ath10k: Detect conf_mutex held ath10k_drain_tx() calls
ath10k_drain_tx() must not be called with conf_mutex held as workers can
use that also. Add call to lockdep_assert_not_held() on conf_mutex to
detect if conf_mutex is held by the caller.
The idea for this patch stemmed from coming across the comment block
above the ath10k_drain_tx() while reviewing the conf_mutex holds during
to debug the conf_mutex lock assert in ath10k_debug_fw_stats_request().
Adding detection to assert on conf_mutex hold will help detect incorrect
usages that could lead to locking problems when async worker routines try
to call this routine.
Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Kalle Valo <kvalo@...eaurora.org>
Link: https://lore.kernel.org/linux-wireless/871rdmu9z9.fsf@codeaurora.org/
---
drivers/net/wireless/ath/ath10k/mac.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index bb6c5ee..5ce4f8d 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4727,6 +4727,8 @@ out:
/* Must not be called with conf_mutex held as workers can use that also. */
void ath10k_drain_tx(struct ath10k *ar)
{
+ lockdep_assert_not_held(&ar->conf_mutex);
+
/* make sure rcu-protected mac80211 tx path itself is drained */
synchronize_net();
Powered by blists - more mailing lists