From 6fb9bf69d3ea98057ae941e9ad0cf5f669c4d568 Mon Sep 17 00:00:00 2001 From: bings Date: Thu, 5 Jul 2018 14:01:53 +0800 Subject: [PATCH] qcacld-3.0: Check txrx_vdev before calling cdp_fc_vdev_flush When txrx_vdev is NULL, zero address access happens if cdp_fc_vdev_flush is called. Before calling cdp_fc_vdev_flush, make sure txrx_vdev is not NULL. Change-Id: I13b52bd3f2fb5e7db6150c8bf645c5bec703bc2b CRs-Fixed: 2272005 --- core/hdd/src/wlan_hdd_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 8c9608af283c..1ab42d63df82 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2128,7 +2128,9 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx) true; hdd_info("tx blocked for session: %d", adapter->session_id); - cdp_fc_vdev_flush(cds_get_context(QDF_MODULE_ID_SOC), + if (adapter->txrx_vdev) + cdp_fc_vdev_flush( + cds_get_context(QDF_MODULE_ID_SOC), adapter->txrx_vdev); } }