Skip to content

Commit bdb1050

Browse files
shuahkhIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/linux-wireless/[email protected]/
1 parent f8cfa46 commit bdb1050

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/wireless/ath/ath10k

1 file changed

+2
-0
lines changed

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4727,6 +4727,8 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
47274727
/* Must not be called with conf_mutex held as workers can use that also. */
47284728
void ath10k_drain_tx(struct ath10k *ar)
47294729
{
4730+
lockdep_assert_not_held(&ar->conf_mutex);
4731+
47304732
/* make sure rcu-protected mac80211 tx path itself is drained */
47314733
synchronize_net();
47324734

0 commit comments

Comments
 (0)