Explorar o código

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
Yeshwanth Sriram Guntuka %!s(int64=4) %!d(string=hai) anos
pai
achega
3ff2bafe8e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      core/hdd/src/wlan_hdd_tx_rx.c

+ 3 - 0
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