netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] d80211: Reinit keys on mode change
@ 2007-01-01 20:19 Jan Kiszka
  2007-01-02 15:31 ` Ivo Van Doorn
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2007-01-01 20:19 UTC (permalink / raw)
  To: Jiri Benc; +Cc: netdev, Ivo Van Doorn, rt2400-devel

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

Switching the interface mode with some encryption keys set and then later
touching any key, triggers an oops because ieee80211_if_reinit fails to
NULL'ify the related pointers after free'ing the key on mode change. Long
explanation, simple fix below.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>

[Sorry, yet another rt2x00 CVS patch...]

---
 ieee80211/ieee80211_iface.c |    1 +
 1 file changed, 1 insertion(+)

Index: rt2x00/ieee80211/ieee80211_iface.c
===================================================================
--- rt2x00.orig/ieee80211/ieee80211_iface.c
+++ rt2x00/ieee80211/ieee80211_iface.c
@@ -231,6 +231,7 @@ void ieee80211_if_reinit(struct net_devi
 					    local->keys[i], 0);
 #endif
 		ieee80211_key_free(sdata->keys[i]);
+		sdata->keys[i] = NULL;
 	}
 
 	/* Shouldn't be necessary but won't hurt */



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

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

end of thread, other threads:[~2007-01-02 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-01 20:19 [PATCH] d80211: Reinit keys on mode change Jan Kiszka
2007-01-02 15:31 ` Ivo Van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).