linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: Fix for crash in cfg80211
@ 2012-08-07  7:10 Srinivasan B
  2012-08-07 11:42 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Srinivasan B @ 2012-08-07  7:10 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes

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@posedge.com>
---

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-07 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-07  7:10 [PATCH] cfg80211: Fix for crash in cfg80211 Srinivasan B
2012-08-07 11:42 ` Johannes Berg
2012-08-07 13:22   ` Mahesh Palivela
2012-08-07 16:20     ` Johannes Berg

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).