From 14aa8ea2eef926eff0ff4e9ed6f2808f431c62b8 Mon Sep 17 00:00:00 2001 From: Mukul Sharma Date: Fri, 30 Oct 2015 22:23:43 +0530 Subject: [PATCH] qcacld-3.0: SSR protection for linux/crda reg_notifier api qcacld-2.0 to qcacld-3.0 propagation if SSR trigger in middle of execution of linux_reg_notifier /crda_reg_notifier, driver may access uninitialized data. Hence Driver need to protect these function from SSR. Change-Id: I9bdc6851a44fecc8353e94b38eb1dd4f63e58604 CRs-Fixed: 798672 --- core/cds/src/cds_reg_service.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index f8d275113245..a0bed553ea06 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -1208,13 +1208,13 @@ static void restore_custom_reg_settings(struct wiphy *wiphy) #endif /** - * hdd_reg_notifier() - regulatory notifier + * __hdd_reg_notifier() - regulatory notifier * @wiphy: wiphy * @request: regulatory request * * Return: void or int */ -void hdd_reg_notifier(struct wiphy *wiphy, +void __hdd_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) { hdd_context_t *hdd_ctx = wiphy_priv(wiphy); @@ -1359,6 +1359,21 @@ void hdd_reg_notifier(struct wiphy *wiphy, return; } +/** + * hdd_reg_notifier() - regulatory notifier + * @wiphy: wiphy + * @request: regulatory request + * + * Return: void or int + */ +void hdd_reg_notifier(struct wiphy *wiphy, + struct regulatory_request *request) +{ + cds_ssr_protect(__func__); + __hdd_reg_notifier(wiphy, request); + cds_ssr_unprotect(__func__); +} + /** * cds_regulatory_init() - regulatory_init * Return: CDF_STATUS