Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4965614 authored by Wei Yongjun's avatar Wei Yongjun Committed by Kalle Valo
Browse files

rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb



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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 7fc1503c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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];