[patch 02/46] iwlagn: avoid sleep in softirq context

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Monday, November 17, 2008 - 12:14 am

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: John W. Linville <linville@tuxdriver.com>

commit 964d2777438bf7687324243d38ade538d9bbfe3c upstream.

__ieee80211_tasklet_handler -> __ieee80211_rx ->
	__ieee80211_rx_handle_packet -> ieee80211_invoke_rx_handlers ->
	ieee80211_rx_h_decrypt -> ieee80211_crypto_tkip_decrypt ->
	ieee80211_tkip_decrypt_data -> iwl4965_mac_update_tkip_key ->
	iwl_scan_cancel_timeout -> msleep

Ooops!

Avoid the sleep by changing iwl_scan_cancel_timeout with
iwl_scan_cancel and simply returning on failure if the scan persists.
This will cause hardware decryption to fail and we'll handle a few more
frames with software decryption.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Holger Macht <hmacht@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3275,7 +3275,11 @@ static void iwl4965_mac_update_tkip_key(
 		return;
 	}
 
-	iwl_scan_cancel_timeout(priv, 100);
+	if (iwl_scan_cancel(priv)) {
+		/* cancel scan failed, just live w/ bad key and rely
+		   briefly on SW decryption */
+		return;
+	}
 
 	key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
 	key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/46] 2.6.27.7-stable review, Greg KH, (Mon Nov 17, 12:13 am)
[patch 02/46] iwlagn: avoid sleep in softirq context, Greg KH, (Mon Nov 17, 12:14 am)
[patch 14/46] rtl8187: Add Abocom USB ID, Greg KH, (Mon Nov 17, 12:15 am)
[patch 21/46] r8169: select MII in Kconfig, Greg KH, (Mon Nov 17, 12:15 am)
[patch 26/46] S390: cpu topology: fix locking, Greg KH, (Mon Nov 17, 12:15 am)
[patch 35/46] USB: gadget: cdc-acm deadlock fix, Greg KH, (Mon Nov 17, 12:16 am)
[patch 37/46] USB: Fix PS3 USB shutdown problems, Greg KH, (Mon Nov 17, 12:16 am)
[patch 39/46] USB: EHCI: fix divide-by-zero bug, Greg KH, (Mon Nov 17, 12:16 am)
[patch 42/46] ACPI: EC: revert msleep patch, Greg KH, (Mon Nov 17, 12:17 am)
[patch 43/46] ACPI: EC: wait for last write gpe, Greg KH, (Mon Nov 17, 12:17 am)
[patch 44/46] ACPI: EC: restart failed command, Greg KH, (Mon Nov 17, 12:17 am)
Re: [patch 25/46] V4L/DVB (9624): CVE-2008-5033: fix OOPS ..., Mauro Carvalho Chehab, (Mon Nov 17, 6:31 am)
Re: [stable] [patch 24/46] Fix broken ownership of /proc/s ..., Rafael J. Wysocki, (Mon Nov 17, 3:25 pm)