From: Sven Neumann Date: Tue, 30 Aug 2011 21:38:53 +0000 (+0200) Subject: cfg80211: hold reg_mutex when updating regulatory X-Git-Tag: v3.2-rc1~129^2~254^2~79 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eac03e381957a05f3842ceb8de987a1025966ecf;p=pandora-kernel.git cfg80211: hold reg_mutex when updating regulatory The function wiphy_update_regulatory() uses the static variable last_request and thus needs to be called with reg_mutex held. This is the case for all users in reg.c, but the function was exported for use by wiphy_register(), from where it is called without the lock being held. Fix this by making wiphy_update_regulatory() private and introducing regulatory_update() as a wrapper that acquires and holds the lock. Signed-off-by: Sven Neumann Cc: John W. Linville Cc: Luis R. Rodriguez Cc: Daniel Mack Cc: linux-wireless@vger.kernel.org Acked-by: Luis R. Rodriguez Signed-off-by: John W. Linville --- Reading git-diff-tree failed