소스 검색

qca-wifi: Fix dfs null pointer dereference issue

When a DFS pulse is being processed, a channel change change can happen.
And the channel change initializes the radar filters which means
it frees and allocates the DFS filtering data structures.
This may result in memory violation (NULL Pointer dereference).

To avoid the memory violation lock the filter initialization and
DFS pulse processing.

Change-Id: Ibb90d067273b24f165205610d76709c6cbc36487
CRs-Fixed: 2317455
Signed-off-by: Vignesh U <[email protected]>
Abhijit Pradhan 6 년 전
부모
커밋
42442e0af0

+ 2 - 0
direct_attach/umac/dfs/core/src/filtering/ar5212_radar.c

@@ -220,5 +220,7 @@ void dfs_get_radars_for_ar5212(struct wlan_dfs *dfs)
 	rinfo.dfs_defaultparams.pe_prssi = AR5212_DFS_PRSSI;
 	rinfo.dfs_defaultparams.pe_inband = AR5212_DFS_INBAND;
 
+	WLAN_DFS_DATA_STRUCT_LOCK(dfs);
 	dfs_init_radar_filters(dfs, &rinfo);
+	WLAN_DFS_DATA_STRUCT_UNLOCK(dfs);
 }

+ 2 - 0
direct_attach/umac/dfs/core/src/filtering/ar5416_radar.c

@@ -168,5 +168,7 @@ void dfs_get_radars_for_ar5416(struct wlan_dfs *dfs)
 	rinfo.dfs_defaultparams.pe_relstep = AR5416_DFS_RELSTEP;
 	rinfo.dfs_defaultparams.pe_maxlen = AR5416_DFS_MAXLEN;
 
+	WLAN_DFS_DATA_STRUCT_LOCK(dfs);
 	dfs_init_radar_filters(dfs, &rinfo);
+	WLAN_DFS_DATA_STRUCT_UNLOCK(dfs);
 }

+ 2 - 0
direct_attach/umac/dfs/core/src/filtering/ar9300_radar.c

@@ -246,5 +246,7 @@ void dfs_get_radars_for_ar9300(struct wlan_dfs *dfs)
 	rinfo.dfs_defaultparams.pe_relstep = AR9300_DFS_RELSTEP;
 	rinfo.dfs_defaultparams.pe_maxlen = AR9300_DFS_MAXLEN;
 
+	WLAN_DFS_DATA_STRUCT_LOCK(dfs);
 	dfs_init_radar_filters(dfs, &rinfo);
+	WLAN_DFS_DATA_STRUCT_UNLOCK(dfs);
 }