linux-sg2042/net/wireless
Johannes Berg 7be69c0b9a wext: fix get_wireless_stats locking
Currently, get_wireless_stats is racy by _design_. This is
because it returns a buffer, which needs to be statically
allocated since it cannot be freed if it was allocated
dynamically. Also, SIOCGIWSTATS and /proc/net/wireless use
no common lock, and /proc/net/wireless accesses are not
synchronised against each other. This is a design flaw in
get_wireless_stats since the beginning.

This patch fixes it by wrapping /proc/net/wireless accesses
with the RTNL so they are protected against each other and
SIOCGIWSTATS. The more correct method of fixing this would
be to pass in the buffer instead of returning it and have
the caller take care of synchronisation of the buffer, but
even then most drivers probably assume that their callback
is protected by the RTNL like all other wext callbacks.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-11 15:24:07 -04:00
..
Kconfig cfg80211: default CONFIG_WIRELESS_OLD_REGULATORY to n 2009-03-27 20:13:23 -04:00
Makefile cfg80211/nl80211: add IBSS API 2009-04-22 16:57:17 -04:00
core.c cfg80211: put wext data into substructure 2009-05-11 15:24:07 -04:00
core.h cfg80211: clear WEXT SSID when clearing IBSS 2009-04-22 16:57:17 -04:00
ibss.c cfg80211: put wext data into substructure 2009-05-11 15:24:07 -04:00
lib80211.c lib80211: consolidate crypt init routines 2008-11-21 11:08:17 -05:00
lib80211_crypt_ccmp.c lib80211: silence excessive crypto debugging messages 2009-03-16 18:01:58 -04:00
lib80211_crypt_tkip.c lib80211: silence excessive crypto debugging messages 2009-03-16 18:01:58 -04:00
lib80211_crypt_wep.c lib80211: absorb crypto bits from net/ieee80211 2008-11-21 11:08:17 -05:00
mlme.c nl80211: Add event for authentication/association timeout 2009-04-22 16:57:21 -04:00
nl80211.c cfg80211: disallow interfering with stations on non-AP 2009-05-11 15:24:07 -04:00
nl80211.h nl80211: Add event for authentication/association timeout 2009-04-22 16:57:21 -04:00
radiotap.c wireless: use get/put_unaligned_* helpers 2008-05-14 16:29:32 -04:00
reg.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-05-08 12:46:17 -07:00
reg.h cfg80211: make __regulatory_hint() static 2009-02-27 14:52:59 -05:00
scan.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-05-08 12:46:17 -07:00
sysfs.c cfg80211: rename cfg80211_registered_device's idx to wiphy_idx 2009-02-27 14:52:54 -05:00
sysfs.h [WIRELESS] cfg80211: New wireless config infrastructure. 2007-04-25 22:29:41 -07:00
util.c cfg80211: clean up includes 2009-04-22 16:57:17 -04:00
wext-compat.c cfg80211: fix wext iw_freq parsing 2009-05-11 15:23:54 -04:00
wext.c wext: fix get_wireless_stats locking 2009-05-11 15:24:07 -04:00