qcacmn: Add Sanity Checks

Stats are updated periodically and
are categorized to soc, pdev, and
vdev

While the stats are getting updated
and if pdev, or vdev gets detached
in the same time, the stats handlers
will deference a NULL pointer

Hence Add basic sanity checks to DP
layer for soc, pdev and vdev inside
stat handlers

Change-Id: Ic4919b9c205679e1d6e7c571c577339be65c1bad
This commit is contained in:
phadiman
2018-12-18 16:13:59 +05:30
committed by nshrivas
parent d1698b6d90
commit 497573091a
4 changed files with 20 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
cdp_rx_ppdu->lsig_a = ppdu_info->rx_status.rate;
ast_index = ppdu_info->rx_status.ast_index;
if (ast_index > (WLAN_UMAC_PSOC_MAX_PEERS * 2)) {
if (ast_index >= (WLAN_UMAC_PSOC_MAX_PEERS * 2)) {
cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
return;
}
@@ -528,6 +528,7 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id,
while (!qdf_nbuf_is_queue_empty(&pdev->rx_status_q)) {
status_nbuf = qdf_nbuf_queue_remove(&pdev->rx_status_q);
rx_tlv = qdf_nbuf_data(status_nbuf);
rx_tlv_start = rx_tlv;