Patch Description:
cfg80211 module crashes when cfg80211 & mac80211
loaded and unloading lmac driver.
Scenario Explanation:
(Step 1) : cfg80211, mac80211 and lmac driver
modules are loaded initially.
(Step 2) : unload the lmac driver.
then any dev calls to stack causes
the crash.
Code Changes:
dev->ethtools_ops is assigned during
NETDEV_REGISTER and the same can be cleared during NETDEV_UNREGISTER.
Signed-off-by: Srinivasan Chandrasekaran <srinivasb@xxxxxxxxxxx>
---
diff --git a/net/wireless/core.c b/net/wireless/core.c
index dcd64d5..74bb7c4 100755
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -944,6 +944,10 @@ static int cfg80211_netdev_notifier_call(struct
notifier_block *nb,
#endif
}
mutex_unlock(&rdev->devlist_mtx);
+
+ if (dev->ethtool_ops)
+ dev->ethtool_ops = NULL;
+
/*
* synchronise (so that we won't find this netdev
* from other code any more) and then clear the list
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html