All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivasan B <srinivasanb@posedge.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: [PATCH] cfg80211: Fix for crash in cfg80211
Date: Tue, 07 Aug 2012 12:40:07 +0530	[thread overview]
Message-ID: <5020BF4F.2090304@posedge.com> (raw)

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

             reply	other threads:[~2012-08-07  7:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  7:10 Srinivasan B [this message]
2012-08-07 11:42 ` [PATCH] cfg80211: Fix for crash in cfg80211 Johannes Berg
2012-08-07 13:22   ` Mahesh Palivela
2012-08-07 16:20     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5020BF4F.2090304@posedge.com \
    --to=srinivasanb@posedge.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.