[PATCH] libertas: fix invalid access

Sven Neumann s.neumann at raumfeld.com
Sun Nov 21 08:55:34 EST 2010


card->priv must not be accessed after lbs_remove_card() was called
as lbs_remove_card() frees card->priv via free_netdev().

Reported-by: Daniel Drake <dsd at laptop.org>
Signed-off-by: Sven Neumann <s.neumann at raumfeld.com>
---
 drivers/net/wireless/libertas/if_sdio.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 87b6349..842df2d 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -1185,7 +1185,6 @@ static void if_sdio_remove(struct sdio_func *func)
 	lbs_deb_sdio("call remove card\n");
 	lbs_stop_card(card->priv);
 	lbs_remove_card(card->priv);
-	card->priv->surpriseremoved = 1;
 
 	flush_workqueue(card->workqueue);
 	destroy_workqueue(card->workqueue);
-- 
1.7.2.3


--=-PP6z/GxBbgLCTns4Sn1u--




More information about the libertas-dev mailing list