* [PATCH] bcm43xx: fix iwmode crash when down
@ 2006-05-01 20:29 Michael Buesch
0 siblings, 0 replies; 2+ messages in thread
From: Michael Buesch @ 2006-05-01 20:29 UTC (permalink / raw)
To: John W. Linville, Andrew Morton; +Cc: Johannes Berg, bcm43xx-dev, netdev
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
This should go into 2.6.17, as it fixes a user exploitable crash.
--
This fixes a crash when
iwconfig ethX mode foo
is done before
ifconfig ethX up
or after
ifconfig ethX down
Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_wx.c 2006-04-22 17:47:03.000000000 +0200
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_wx.c 2006-05-01 22:10:18.000000000 +0200
@@ -182,8 +182,11 @@
mode = BCM43xx_INITIAL_IWMODE;
bcm43xx_lock_mmio(bcm, flags);
- if (bcm->ieee->iw_mode != mode)
- bcm43xx_set_iwmode(bcm, mode);
+ if (bcm->initialized) {
+ if (bcm->ieee->iw_mode != mode)
+ bcm43xx_set_iwmode(bcm, mode);
+ } else
+ bcm->ieee->iw_mode = mode;
bcm43xx_unlock_mmio(bcm, flags);
return 0;
--
Greetings Michael.
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] bcm43xx: fix iwmode crash when down
@ 2006-05-01 20:43 Michael Buesch
0 siblings, 0 replies; 2+ messages in thread
From: Michael Buesch @ 2006-05-01 20:43 UTC (permalink / raw)
To: John W. Linville, Andrew Morton; +Cc: Johannes Berg, bcm43xx-dev, netdev
(Second attempt, now unmangled and with signed-off-by line, uh...)
This should go into 2.6.17, as it fixes a user exploitable crash.
--
This fixes a crash when
iwconfig ethX mode foo
is done before
ifconfig ethX up
or after
ifconfig ethX down
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_wx.c 2006-04-22 17:47:03.000000000 +0200
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_wx.c 2006-05-01 22:10:18.000000000 +0200
@@ -182,8 +182,11 @@
mode = BCM43xx_INITIAL_IWMODE;
bcm43xx_lock_mmio(bcm, flags);
- if (bcm->ieee->iw_mode != mode)
- bcm43xx_set_iwmode(bcm, mode);
+ if (bcm->initialized) {
+ if (bcm->ieee->iw_mode != mode)
+ bcm43xx_set_iwmode(bcm, mode);
+ } else
+ bcm->ieee->iw_mode = mode;
bcm43xx_unlock_mmio(bcm, flags);
return 0;
--
Greetings Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-01 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01 20:29 [PATCH] bcm43xx: fix iwmode crash when down Michael Buesch
-- strict thread matches above, loose matches on Subject: below --
2006-05-01 20:43 Michael Buesch
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).