linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: fix scheduling while atomic bug on config
@ 2013-10-02  9:51 Michal Kazior
  2013-10-02 11:18 ` Michal Kazior
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kazior @ 2013-10-02  9:51 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

Recent WMI/HTC changes introduces this bug because
now WMI commands can sleep.

Use appropriate interface iteration function.

Reported-By: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8684e03..b65df84 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1935,9 +1935,8 @@ static void ath10k_config_ps(struct ath10k *ar)
 	memset(&ar_iter, 0, sizeof(struct ath10k_generic_iter));
 	ar_iter.ar = ar;
 
-	ieee80211_iterate_active_interfaces_atomic(
-		ar->hw, IEEE80211_IFACE_ITER_NORMAL,
-		ath10k_ps_iter, &ar_iter);
+	ieee80211_iterate_active_interfaces(ar->hw, IEEE80211_IFACE_ITER_NORMAL,
+					    ath10k_ps_iter, &ar_iter);
 
 	if (ar_iter.ret)
 		ath10k_warn("failed to set ps config (%d)\n", ar_iter.ret);
@@ -2840,9 +2839,8 @@ static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 	ar_iter.ar = ar;
 
 	mutex_lock(&ar->conf_mutex);
-	ieee80211_iterate_active_interfaces_atomic(
-		hw, IEEE80211_IFACE_ITER_NORMAL,
-		ath10k_set_rts_iter, &ar_iter);
+	ieee80211_iterate_active_interfaces(hw, IEEE80211_IFACE_ITER_NORMAL,
+					    ath10k_set_rts_iter, &ar_iter);
 	mutex_unlock(&ar->conf_mutex);
 
 	return ar_iter.ret;
@@ -2881,9 +2879,8 @@ static int ath10k_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
 	ar_iter.ar = ar;
 
 	mutex_lock(&ar->conf_mutex);
-	ieee80211_iterate_active_interfaces_atomic(
-		hw, IEEE80211_IFACE_ITER_NORMAL,
-		ath10k_set_frag_iter, &ar_iter);
+	ieee80211_iterate_active_interfaces(hw, IEEE80211_IFACE_ITER_NORMAL,
+					    ath10k_set_frag_iter, &ar_iter);
 	mutex_unlock(&ar->conf_mutex);
 
 	return ar_iter.ret;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k: fix scheduling while atomic bug on config
  2013-10-02  9:51 [PATCH] ath10k: fix scheduling while atomic bug on config Michal Kazior
@ 2013-10-02 11:18 ` Michal Kazior
  2013-10-02 13:00   ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kazior @ 2013-10-02 11:18 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

On 2 October 2013 11:51, Michal Kazior <michal.kazior@tieto.com> wrote:
> Recent WMI/HTC changes introduces this bug because
> now WMI commands can sleep.
>
> Use appropriate interface iteration function.
>
> Reported-By: Kalle Valo <kvalo@qca.qualcomm.com>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

Self NACK.

I've posted this too soon. This patch can lead to deadlocks on
iflist_mtx in some cases.


Michał

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k: fix scheduling while atomic bug on config
  2013-10-02 11:18 ` Michal Kazior
@ 2013-10-02 13:00   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2013-10-02 13:00 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> On 2 October 2013 11:51, Michal Kazior <michal.kazior@tieto.com> wrote:
>> Recent WMI/HTC changes introduces this bug because
>> now WMI commands can sleep.
>>
>> Use appropriate interface iteration function.
>>
>> Reported-By: Kalle Valo <kvalo@qca.qualcomm.com>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> Self NACK.
>
> I've posted this too soon. This patch can lead to deadlocks on
> iflist_mtx in some cases.

Ok, thanks for letting me know. I'll drop the patch from my queue.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-02 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02  9:51 [PATCH] ath10k: fix scheduling while atomic bug on config Michal Kazior
2013-10-02 11:18 ` Michal Kazior
2013-10-02 13:00   ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).