diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-05 16:11:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-05 16:11:26 -0700 |
commit | d961446d4dec18ec727bcd34153098ea06e35c5c (patch) | |
tree | e6fb4424f14cfadc02ba6999f703a74f131b1670 | |
parent | e7810475a328810baa3d74c0af5eb433231a3c13 (diff) | |
download | longterm-queue-2.6.33-d961446d4dec18ec727bcd34153098ea06e35c5c.tar.gz |
.33 patches
-rw-r--r-- | queue-2.6.33/iwlwifi-fix-skb-usage-after-free.patch | 53 | ||||
-rw-r--r-- | queue-2.6.33/series | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/queue-2.6.33/iwlwifi-fix-skb-usage-after-free.patch b/queue-2.6.33/iwlwifi-fix-skb-usage-after-free.patch new file mode 100644 index 0000000..084cfde --- /dev/null +++ b/queue-2.6.33/iwlwifi-fix-skb-usage-after-free.patch @@ -0,0 +1,53 @@ +From b25026981aecde3685dd0e45ad980fff9f528daa Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka <sgruszka@redhat.com> +Date: Wed, 20 Apr 2011 15:57:14 +0200 +Subject: iwlwifi: fix skb usage after free + +From: Stanislaw Gruszka <sgruszka@redhat.com> + +commit b25026981aecde3685dd0e45ad980fff9f528daa upstream. + +Since + +commit a120e912eb51e347f36c71b60a1d13af74d30e83 +Author: Stanislaw Gruszka <sgruszka@redhat.com> +Date: Fri Feb 19 15:47:33 2010 -0800 + + iwlwifi: sanity check before counting number of tfds can be free + +we use skb->data after calling ieee80211_tx_status_irqsafe(), which +could free skb instantly. + +On current kernels I do not observe practical problems related with +bug, but on 2.6.35.y it cause random system hangs when stressing +wireless link. + +Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> +Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/net/wireless/iwlwifi/iwl-tx.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/iwl-tx.c ++++ b/drivers/net/wireless/iwlwifi/iwl-tx.c +@@ -1162,11 +1162,15 @@ int iwl_tx_queue_reclaim(struct iwl_priv + q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) { + + tx_info = &txq->txb[txq->q.read_ptr]; +- iwl_tx_status(priv, tx_info->skb[0]); ++ ++ if (WARN_ON_ONCE(tx_info->skb == NULL)) ++ continue; + + hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data; +- if (hdr && ieee80211_is_data_qos(hdr->frame_control)) ++ if (ieee80211_is_data_qos(hdr->frame_control)) + nfreed++; ++ ++ iwl_tx_status(priv, tx_info->skb[0]); + tx_info->skb[0] = NULL; + + if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) diff --git a/queue-2.6.33/series b/queue-2.6.33/series index 3a46789..1e8bf9e 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -40,3 +40,4 @@ can-add-missing-socket-check-in-can-bcm-release.patch fs-partitions-ldm.c-fix-oops-caused-by-corrupted-partition-table.patch libata-set-queue-dma-alignment-to-sector-size-for-atapi-too.patch usb-musb-core-set-has_tt-flag.patch +iwlwifi-fix-skb-usage-after-free.patch |