diff options
author | Michael Wu <flamingice@sourmilk.net> | 2007-06-29 02:14:35 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-07-18 20:35:48 -0400 |
commit | cfb7267aaba2b59374d7bc765f038698711b09d8 (patch) | |
tree | 5ac53af4883bf52a67382a459a3df04d2623e98f /net | |
parent | 33ccad35a21df51c0d23f3e3e88688524e7b51ed (diff) |
[PATCH] mac80211: remove rtnl locking in ieee80211_sta.c
The rtnl is held in ieee80211_sta.c to prevent some potential
configuration races with userspace. Unfortunately, it also has the
potential for deadlocks on interface down. This patch removes the
rtnl locking to eliminate the deadlocks.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index ba2bf8f0a347..952d8dd0676c 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/wireless.h> | 25 | #include <linux/wireless.h> |
26 | #include <linux/random.h> | 26 | #include <linux/random.h> |
27 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
28 | #include <linux/rtnetlink.h> | ||
29 | #include <net/iw_handler.h> | 28 | #include <net/iw_handler.h> |
30 | #include <asm/types.h> | 29 | #include <asm/types.h> |
31 | 30 | ||
@@ -2107,12 +2106,9 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
2107 | struct ieee80211_sta_bss *bss, *selected = NULL; | 2106 | struct ieee80211_sta_bss *bss, *selected = NULL; |
2108 | int top_rssi = 0, freq; | 2107 | int top_rssi = 0, freq; |
2109 | 2108 | ||
2110 | rtnl_lock(); | ||
2111 | |||
2112 | if (!ifsta->auto_channel_sel && !ifsta->auto_bssid_sel && | 2109 | if (!ifsta->auto_channel_sel && !ifsta->auto_bssid_sel && |
2113 | !ifsta->auto_ssid_sel) { | 2110 | !ifsta->auto_ssid_sel) { |
2114 | ifsta->state = IEEE80211_AUTHENTICATE; | 2111 | ifsta->state = IEEE80211_AUTHENTICATE; |
2115 | rtnl_unlock(); | ||
2116 | ieee80211_sta_reset_auth(dev, ifsta); | 2112 | ieee80211_sta_reset_auth(dev, ifsta); |
2117 | return 0; | 2113 | return 0; |
2118 | } | 2114 | } |
@@ -2155,7 +2151,6 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
2155 | ieee80211_sta_set_bssid(dev, selected->bssid); | 2151 | ieee80211_sta_set_bssid(dev, selected->bssid); |
2156 | ieee80211_rx_bss_put(dev, selected); | 2152 | ieee80211_rx_bss_put(dev, selected); |
2157 | ifsta->state = IEEE80211_AUTHENTICATE; | 2153 | ifsta->state = IEEE80211_AUTHENTICATE; |
2158 | rtnl_unlock(); | ||
2159 | ieee80211_sta_reset_auth(dev, ifsta); | 2154 | ieee80211_sta_reset_auth(dev, ifsta); |
2160 | return 0; | 2155 | return 0; |
2161 | } else { | 2156 | } else { |
@@ -2166,7 +2161,6 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
2166 | } else | 2161 | } else |
2167 | ifsta->state = IEEE80211_DISABLED; | 2162 | ifsta->state = IEEE80211_DISABLED; |
2168 | } | 2163 | } |
2169 | rtnl_unlock(); | ||
2170 | return -1; | 2164 | return -1; |
2171 | } | 2165 | } |
2172 | 2166 | ||