Commit 6f80240e authored by Johannes Berg's avatar Johannes Berg Committed by Reinette Chatre

iwlagn: fix bug in txq freeing

The iwl_hw_txq_free_tfd() function can be
called from contexts with IRQs disabled,
so it must not call dev_kfree_skb() but
rather dev_kfree_skb_any() instead.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent 4f5fa237
...@@ -484,10 +484,17 @@ void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) ...@@ -484,10 +484,17 @@ void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
iwl_tfd_tb_get_len(tfd, i), PCI_DMA_TODEVICE); iwl_tfd_tb_get_len(tfd, i), PCI_DMA_TODEVICE);
if (txq->txb) { if (txq->txb) {
dev_kfree_skb(txq->txb[txq->q.read_ptr].skb[i - 1]); struct sk_buff *skb;
skb = txq->txb[txq->q.read_ptr].skb[i - 1];
/* can be called from irqs-disabled context */
if (skb) {
dev_kfree_skb_any(skb);
txq->txb[txq->q.read_ptr].skb[i - 1] = NULL; txq->txb[txq->q.read_ptr].skb[i - 1] = NULL;
} }
} }
}
} }
int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment