Search Linux Wireless

wl12xx compat wireless rcu_read_lock issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When trying to test wl12xx driver from compat-wireless-2010-12-13 (with a wl1273 device), I notice a crash when initializing the wlan interface.

Find below the patch that seems to solve the issue:

diff --git a/compat-wireless-2010-12-13/drivers/net/wireless/wl12xx/main.c b/compat-wireless-2010-12-13/drivers/net/wireless/wl12xx/main.c
index 1fc5a36..480f44b 100644
--- a/compat-wireless-2010-12-13/drivers/net/wireless/wl12xx/main.c
+++ b/compat-wireless-2010-12-13/drivers/net/wireless/wl12xx/main.c
@@ -1858,11 +1858,17 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
 {
            enum wl1271_cmd_ps_mode mode;
            struct wl1271 *wl = hw->priv;
-           struct ieee80211_sta *sta = ieee80211_find_sta(vif, bss_conf->bssid);
+          rcu_read_lock();
+          struct ieee80211_sta *sta;
            bool do_join = false;
            bool set_assoc = false;
            int ret;

+          sta = ieee80211_find_sta(vif, bss_conf->bssid);
+          if (!sta) {
+                      rcu_read_unlock();
+                      return;
+          }

            wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed");
+     	rcu_read_unlock();
            mutex_lock(&wl->mutex);

--

Is this a known bug that has already been encountered? I am using the compat wireless flavor of the mac80211 framework and driver so I don't really know if you can come across this issue with standard kernel.

Thanks,

John
--
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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux