]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cfg80211: process pending events when unregistering net device
authorDaniel Drake <dsd@laptop.org>
Thu, 2 Aug 2012 17:41:48 +0000 (18:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 14:53:03 +0000 (07:53 -0700)
commit9b9efe7459c14ccb49e87f1bc46289a9a26e8602
treed84472438b14dbd518ebc38ec885be648ab3b8c1
parent5d16505b11ba551e59d2b61485549a36e9694f47
cfg80211: process pending events when unregistering net device

commit 1f6fc43e621167492ed4b7f3b4269c584c3d6ccc upstream.

libertas currently calls cfg80211_disconnected() when it is being
brought down. This causes an event to be allocated, but since the
wdev is already removed from the rdev by the time that the event
processing work executes, the event is never processed or freed.
http://article.gmane.org/gmane.linux.kernel.wireless.general/95666

Fix this leak, and other possible situations, by processing the event
queue when a device is being unregistered. Thanks to Johannes Berg for
the suggestion.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/core.c
net/wireless/core.h
net/wireless/util.c