aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-07-10 14:02:58 (GMT)
committerJouni Malinen <j@w1.fi>2003-07-10 14:02:58 (GMT)
commite8a31963af419e8aaf4a60bc554043e5e00c048f (patch)
tree5fc3385c3d249b5cf62a7e014d020e33792ef236
parent07a7d36fdf1048d08cc0509036e1132af245cc02 (diff)
downloadhostap-history-e8a31963af419e8aaf4a60bc554043e5e00c048f.zip
hostap-history-e8a31963af419e8aaf4a60bc554043e5e00c048f.tar.gz
hostap-history-e8a31963af419e8aaf4a60bc554043e5e00c048f.tar.bz2
Patch from Pavel Roskin:
Using AccessConfigurationRegister is unsafe is the card has been removed. There is a long-standing bug in the PCMCIA drivers that causes a kernel oops. This bug was been patched in pcmcia-cs, but it's still present in the kernel PCMCIA drivers (both 2.4.x and 2.5.x). I have just sent a patch to LKML, but I think it's a good idea to put protection into the HostAP driver itself, especially because it's reasonable and simple.
-rw-r--r--driver/modules/hostap_cs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/modules/hostap_cs.c b/driver/modules/hostap_cs.c
index d18dc98..f00e548 100644
--- a/driver/modules/hostap_cs.c
+++ b/driver/modules/hostap_cs.c
@@ -224,6 +224,9 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
int res;
conf_reg_t reg;
+ if (!prism2_pccard_card_present(local))
+ return;
+
reg.Function = 0;
reg.Action = CS_READ;
reg.Offset = CISREG_COR;