Browse Source

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 4 năm trước cách đây
mục cha
commit
3ff2bafe8e
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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