[PATCH 1/1] UBUNTU: SAUCE: wiphy_update_regulatory: avoid beacons and notifiers if no regulatory_domain

Andy Whitcroft apw at canonical.com
Wed Apr 8 14:51:34 UTC 2009


Bug: #337929

When registering a new PHY we end up calling wiphy_update_regulatory().
This then attempts to process that in the context of the regulatory
domain.  Finally processing visible beacons and passing the new
regulatory context to any device notifiers.

However if there is not yet a regulatory domain set then last_request
will be null.  Neither reg_process_beacons nor at least the ath9k
notifiers are safe in the face of this being null leading to panics.
Ignore these when we have not yet got a regulatory domain.

Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 updates/compat-wireless-2.6/net/wireless/reg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/updates/compat-wireless-2.6/net/wireless/reg.c b/updates/compat-wireless-2.6/net/wireless/reg.c
index ce66bfd..a9a02dc 100644
--- a/updates/compat-wireless-2.6/net/wireless/reg.c
+++ b/updates/compat-wireless-2.6/net/wireless/reg.c
@@ -1137,6 +1137,8 @@ void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby)
 			handle_band(wiphy, band);
 	}
 out:
+	if (!last_request)
+		return;
 	reg_process_beacons(wiphy);
 	if (wiphy->reg_notifier)
 		wiphy->reg_notifier(wiphy, last_request);
-- 
1.6.2.1.590.g2333





More information about the kernel-team mailing list