diff options
author | Avinash Patil <patila@marvell.com> | 2015-01-28 15:42:00 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-29 10:20:09 +0200 |
commit | 4facc34a1f1d6ba8fafc9afdb84f9c6ed4334c4c (patch) | |
tree | 3d6043f8200b5be8404ce522e48d5128732aea83 /drivers/net/wireless/mwifiex/main.c | |
parent | 09f63ae65f907a7fadf7fcf408f80909cbf2af4b (diff) | |
download | lwn-4facc34a1f1d6ba8fafc9afdb84f9c6ed4334c4c.tar.gz lwn-4facc34a1f1d6ba8fafc9afdb84f9c6ed4334c4c.zip |
mwifiex: do not declare wdev as pointer
wdev is used even after del_virtual_interface handler in cfg80211
in nl80211_post_doit. Since we have freed wdev in handling of
del_virtual_intf, this can result into crash while deleting
interface.
Avoid this be not declaring wdev which part of
mwifiex_private structure but struct wireless_dev type.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 99cd3604b3f3..49dec6b4dc96 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c @@ -1203,8 +1203,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) continue; rtnl_lock(); - if (priv->wdev && priv->netdev) - mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev); + if (priv->netdev && + priv->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) + mwifiex_del_virtual_intf(adapter->wiphy, &priv->wdev); rtnl_unlock(); } |