Linux wireless drivers development
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Johannes Berg <johannes.berg@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 15/23] iwlagn: fix bug in txq freeing
Date: Sat,  5 Jun 2010 23:56:30 -0700	[thread overview]
Message-ID: <1275807398-18184-16-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1275807398-18184-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 9c85e1b..a61d567 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -484,8 +484,15 @@ 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);
 
 		if (txq->txb) {
-			dev_kfree_skb(txq->txb[txq->q.read_ptr].skb[i - 1]);
-			txq->txb[txq->q.read_ptr].skb[i - 1] = NULL;
+			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;
+			}
 		}
 	}
 }
-- 
1.7.0.4


  parent reply	other threads:[~2010-06-06  6:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-06  6:56 [PATCH 00/23] iwlwifi updates for 2.6.36 Reinette Chatre
2010-06-06  6:56 ` [PATCH 01/23] iwlwifi: remove useless node_addr assignments Reinette Chatre
2010-06-06  6:56 ` [PATCH 02/23] iwlwifi: remove unused wlap_bssid_addr assignment Reinette Chatre
2010-06-06  6:56 ` [PATCH 03/23] iwlwifi: remove mac_addr assignment Reinette Chatre
2010-06-06  6:56 ` [PATCH 04/23] iwlwifi: set MAC address in RXON from interface Reinette Chatre
2010-06-06  6:56 ` [PATCH 05/23] iwlwifi: use virtual interface address for scan Reinette Chatre
2010-06-06  6:56 ` [PATCH 06/23] iwlwifi: remove debug frame dumping Reinette Chatre
2010-06-06  6:56 ` [PATCH 07/23] iwlwifi: do not clear data after chain noise calib Reinette Chatre
2010-06-06  6:56 ` [PATCH 08/23] iwlwifi: remove unused parameter in iwl_priv Reinette Chatre
2010-06-06  6:56 ` [PATCH 09/23] iwlwifi: beacon format related helper function Reinette Chatre
2010-06-06  6:56 ` [PATCH 10/23] iwlwifi: support channel switch offload in driver Reinette Chatre
2010-06-06  6:56 ` [PATCH 11/23] iwlwifi: beacon internal time unit Reinette Chatre
2010-06-06  6:56 ` [PATCH 12/23] iwlwifi: remove priv->mac_addr Reinette Chatre
2010-06-06  6:56 ` [PATCH 13/23] iwlwifi: remove inaccurate comment Reinette Chatre
2010-06-06  6:56 ` [PATCH 14/23] iwl3945: fix bugs in txq freeing Reinette Chatre
2010-06-06  6:56 ` Reinette Chatre [this message]
2010-06-06  6:56 ` [PATCH 16/23] iwlwifi: kzalloc txb array Reinette Chatre
2010-06-06  6:56 ` [PATCH 17/23] iwlwifi: reduce memory allocation Reinette Chatre
2010-06-06  6:56 ` [PATCH 18/23] iwlwifi: do not use huge command buffer for channel switch Reinette Chatre
2010-06-06  6:56 ` [PATCH 19/23] iwlwifi: generic scan TX antenna forcing Reinette Chatre
2010-06-06  6:56 ` [PATCH 20/23] iwlwifi: queue user-initiated scan when doing internal scan Reinette Chatre
2010-06-06  6:56 ` [PATCH 21/23] iwlwifi: remove unused parameter Reinette Chatre
2010-06-06  6:56 ` [PATCH 22/23] iwlwifi: parse block ack responses correctly Reinette Chatre
2010-06-06  6:56 ` [PATCH 23/23] iwlwifi: fix wrapping when handling aggregated batches Reinette Chatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275807398-18184-16-git-send-email-reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox