linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb
@ 2016-11-01 14:48 Wei Yongjun
  2016-11-17  6:48 ` [net-next] " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-11-01 14:48 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo; +Cc: Wei Yongjun, linux-wireless

From: Wei Yongjun <weiyongjun1@huawei.com>

It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled, spin_lock_irqsave()
make sure always in irq disable context. So the kfree_skb()
should be replaced with dev_kfree_skb_irq().

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 8e7f23c..e89681d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1832,7 +1832,7 @@ bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
 	pskb = __skb_dequeue(&ring->queue);
-	kfree_skb(pskb);
+	dev_kfree_skb_irq(pskb);
 
 	/*this is wrong, fill_tx_cmddesc needs update*/
 	pdesc = &ring->desc[0];

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

* Re: [net-next] rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb
  2016-11-01 14:48 [PATCH net-next] rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb Wei Yongjun
@ 2016-11-17  6:48 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-11-17  6:48 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Larry Finger, Chaoming Li, Wei Yongjun, linux-wireless

Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> It is not allowed to call kfree_skb() from hardware interrupt
> context or with interrupts being disabled, spin_lock_irqsave()
> make sure always in irq disable context. So the kfree_skb()
> should be replaced with dev_kfree_skb_irq().
> 
> This is detected by Coccinelle semantic patch.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

e49656147359 rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb

-- 
https://patchwork.kernel.org/patch/9407493/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2016-11-17  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01 14:48 [PATCH net-next] rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb Wei Yongjun
2016-11-17  6:48 ` [net-next] " 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).