cfg80211: make spurious warnings less likely, configurable
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 21 Aug 2009 10:23:49 +0000 (12:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Aug 2009 18:40:30 +0000 (14:40 -0400)
commitf7969969f416e593bcc7dc24abf3f9fd6c27136d
tree4f4e2ef49d2afae82442ba273d7490938232f113
parent3d832611d794b3d312d26a4b251ac5285206f90d
cfg80211: make spurious warnings less likely, configurable

Bob reported that he got warnings in IBSS mode about
the ssid_len being zero on a joined event, but only
when kmemcheck was enabled. This appears to be due
to a race condition between drivers and userspace,
when the driver reports joined but the user in the
meantime decided to leave the IBSS again, the warning
would trigger. This was made more likely by kmemcheck
delaying the code that does the check and sends the
event.

So first, make the warning trigger closer to the
driver, which means it's not locked, but since only
the warning depends on it that's ok.

And secondly, users will not want to have spurious
warnings at all, so make those that are known to be
racy in such a way configurable.

Reported-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/Kconfig
net/wireless/core.h
net/wireless/ibss.c
net/wireless/sme.c