All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave()
@ 2022-12-07 14:40 Yang Yingliang
  2022-12-11 17:12 ` Stanislaw Gruszka
  2022-12-14 12:21 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-12-07 14:40 UTC (permalink / raw)
  To: stf_xl, kvalo; +Cc: linux-wireless, yangyingliang

It is not allowed to call consume_skb() from hardware interrupt context
or with interrupts being disabled. So replace dev_kfree_skb() with
dev_consume_skb_irq() under spin_lock_irqsave(). Compile tested only.

Fixes: 4bc85c1324aa ("Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/wireless/intel/iwlegacy/common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 341c17fe2af4..96002121bb8b 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -5174,7 +5174,7 @@ il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 	memset(&il->current_ht_config, 0, sizeof(struct il_ht_config));
 
 	/* new association get rid of ibss beacon skb */
-	dev_kfree_skb(il->beacon_skb);
+	dev_consume_skb_irq(il->beacon_skb);
 	il->beacon_skb = NULL;
 	il->timestamp = 0;
 
@@ -5293,7 +5293,7 @@ il_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 	}
 
 	spin_lock_irqsave(&il->lock, flags);
-	dev_kfree_skb(il->beacon_skb);
+	dev_consume_skb_irq(il->beacon_skb);
 	il->beacon_skb = skb;
 
 	timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
-- 
2.25.1


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

* Re: [PATCH] wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave()
  2022-12-07 14:40 [PATCH] wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
@ 2022-12-11 17:12 ` Stanislaw Gruszka
  2022-12-14 12:21 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2022-12-11 17:12 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: kvalo, linux-wireless

On Wed, Dec 07, 2022 at 10:40:13PM +0800, Yang Yingliang wrote:
> It is not allowed to call consume_skb() from hardware interrupt context
> or with interrupts being disabled. So replace dev_kfree_skb() with
> dev_consume_skb_irq() under spin_lock_irqsave(). Compile tested only.
> 
> Fixes: 4bc85c1324aa ("Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>


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

* Re: [PATCH] wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave()
  2022-12-07 14:40 [PATCH] wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
  2022-12-11 17:12 ` Stanislaw Gruszka
@ 2022-12-14 12:21 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-12-14 12:21 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: stf_xl, linux-wireless, yangyingliang

Yang Yingliang <yangyingliang@huawei.com> wrote:

> It is not allowed to call consume_skb() from hardware interrupt context
> or with interrupts being disabled. So replace dev_kfree_skb() with
> dev_consume_skb_irq() under spin_lock_irqsave(). Compile tested only.
> 
> Fixes: 4bc85c1324aa ("Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

Patch applied to wireless-next.git, thanks.

0c1528675d7a wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20221207144013.70210-1-yangyingliang@huawei.com/

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


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

end of thread, other threads:[~2022-12-14 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 14:40 [PATCH] wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-11 17:12 ` Stanislaw Gruszka
2022-12-14 12:21 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.