Browse Source

qcacld-3.0: Add SSR protection wrapper for bus bandwidth compute work

Bus bandwidth compute work handler is missing SSR protection wrapper
although it has HDD validate context check but since HDD validate
context check is not sufficient alone add CDS SSR protection wrapper
around bus bandwidth compute work handler.

Change-Id: I43b3495610b2a9936472ff67a95c7db8dbfa5560
CRs-Fixed: 2307421
Rajeev Kumar 6 years ago
parent
commit
b2b5e695a9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      core/hdd/src/wlan_hdd_main.c

+ 8 - 1
core/hdd/src/wlan_hdd_main.c

@@ -7597,7 +7597,7 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
 }
 
 #define HDD_BW_GET_DIFF(_x, _y) (unsigned long)((ULONG_MAX - (_y)) + (_x) + 1)
-static void hdd_bus_bw_work_handler(struct work_struct *work)
+static void __hdd_bus_bw_work_handler(struct work_struct *work)
 {
 	struct hdd_context *hdd_ctx = container_of(work, struct hdd_context,
 					bus_bw_work);
@@ -7716,6 +7716,13 @@ restart_timer:
 	hdd_exit();
 }
 
+static void hdd_bus_bw_work_handler(struct work_struct *work)
+{
+	cds_ssr_protect(__func__);
+	__hdd_bus_bw_work_handler(work);
+	cds_ssr_unprotect(__func__);
+}
+
 /**
  * __hdd_bus_bw_cbk() - Bus bandwidth data structure callback.
  * @arg: Argument of timer function