]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cfg80211: fix for duplicate userspace replies
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Sun, 31 May 2009 22:24:34 +0000 (18:24 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 2 Jul 2009 23:50:07 +0000 (16:50 -0700)
commiteebd7ca1029a0d253bbc94544ca887fdb05d0b55
tree730ee339097477329c6490b1c32b19f5be36c698
parente58e8373ccdc6ef164009b814d0791705c0d3394
cfg80211: fix for duplicate userspace replies

commit 729e9c7663190d71fe5e29831634df80f38199c1 upstream.

This fixes an incorrect assumption (BUG_ON) made in
cfg80211 when handling country IE regulatory requests.
The assumption was that we won't try to call_crda()
twice for the same event and therefore we will not
recieve two replies through nl80211 for the regulatory
request. As it turns out it is true we don't call_crda()
twice for the same event, however, kobject_uevent_env()
*might* send the udev event twice and/or userspace can
simply process the udev event twice. We remove the BUG_ON()
and simply ignore the duplicate request.

For details refer to this thread:

http://marc.info/?l=linux-wireless&m=124149987921337&w=2

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/wireless/reg.c