From 3ff2bafe8e2637ac23edcbeebdc4e2e306a52fdc Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Wed, 12 Aug 2020 13:38:25 +0530 Subject: [PATCH] qcacld-3.0: Avoid possible NULL soc context dereference Soc context fetched in hdd_rx_check_qdisc_for_adapter is not NULL validated before passing it to other APIs. Fix is to add NULL check for soc context in hdd_rx_check_qdisc_for_adapter. Change-Id: Ib6a660307009e55c54eb4b3747a8efab8e370241 CRs-Fixed: 3264121 --- core/hdd/src/wlan_hdd_tx_rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 346f02040077..dd1f007c647c 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -2158,6 +2158,9 @@ hdd_rx_check_qdisc_for_adapter(struct hdd_adapter *adapter, uint8_t rx_ctx_id) struct Qdisc *ingress_qdisc; bool is_qdisc_ingress = false; + if (qdf_unlikely(!soc)) + return; + /* * This additional ingress_queue NULL check is to avoid * doing RCU lock/unlock in the common scenario where