linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ath10k: fix kernel panic while shutting down AP
@ 2014-10-10 12:08 Rajkumar Manoharan
  2014-10-12 17:59 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Rajkumar Manoharan @ 2014-10-10 12:08 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan, Michal Kazior

Based on GFP flag given to DMA coherent allocation, the behaviour of
dma_free_coherent is changed. This behavioural diffrence is noticeable
in ARM platform. If DMA memory is allocated with GFP_KERNEL, free
coherent can not be called inside spin lock. This is causing kernel
crash in ARM platforms. Fix this by changing GFP flag to atomic.

Cc: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 75e0aeb..14a5944 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2839,7 +2839,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
 		arvif->beacon_buf = dma_zalloc_coherent(ar->dev,
 							IEEE80211_MAX_FRAME_LEN,
 							&arvif->beacon_paddr,
-							GFP_KERNEL);
+							GFP_ATOMIC);
 		if (!arvif->beacon_buf) {
 			ret = -ENOMEM;
 			ath10k_warn(ar, "failed to allocate beacon buffer: %d\n",
-- 
2.1.2


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

* Re: [PATCH v2] ath10k: fix kernel panic while shutting down AP
  2014-10-10 12:08 [PATCH v2] ath10k: fix kernel panic while shutting down AP Rajkumar Manoharan
@ 2014-10-12 17:59 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2014-10-12 17:59 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: ath10k, linux-wireless, Michal Kazior

Rajkumar Manoharan <rmanohar@qti.qualcomm.com> writes:

> Based on GFP flag given to DMA coherent allocation, the behaviour of
> dma_free_coherent is changed. This behavioural diffrence is noticeable
> in ARM platform. If DMA memory is allocated with GFP_KERNEL, free
> coherent can not be called inside spin lock. This is causing kernel
> crash in ARM platforms. Fix this by changing GFP flag to atomic.
>
> Cc: Michal Kazior <michal.kazior@tieto.com>
> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>

Thanks, applied.

I modified the commit log a bit to mention the possible commit causing
this:

commit 82d7aba71541a308bc19e869f7cf7423672dee37
Author: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Date:   Fri Oct 10 17:38:27 2014 +0530

    ath10k: fix kernel panic while shutting down AP
    
    Based on GFP flag given to DMA coherent allocation, the behaviour of
    dma_free_coherent is changed. This behavioural diffrence is noticeable
    in ARM platform. If DMA memory is allocated with GFP_KERNEL, free
    coherent can not be called inside spin lock. This is causing kernel
    crash in ARM platforms. Fix this by changing GFP flag to atomic.
    
    This is most likely a regression from commit 64badcb6d645 ("ath10k: workaround
    fw beaconing bug").
    
    Cc: Michal Kazior <michal.kazior@tieto.com>
    Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
    Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


-- 
Kalle Valo

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

end of thread, other threads:[~2014-10-12 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 12:08 [PATCH v2] ath10k: fix kernel panic while shutting down AP Rajkumar Manoharan
2014-10-12 17:59 ` 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).