Explorar o código

qcacld-3.0: Avoid NULL pointer derefence for PDEV

Currently, NULL pointer dereferencing of objmgr PDEV
is observed in wlan_objmgr_pdev_get_comp_private_obj.

Add NULL check for pdev inside ipa_uc_force_pipe_shutdown
and ipa_fw_rejuvenate_send_msg before pass PDEV to
wlan_objmgr_pdev_get_comp_private_obj.

Change-Id: I4e19cc9c254febabad551aa62f72d2ce4897b852
CRs-Fixed: 2719149
Alok Kumar %!s(int64=4) %!d(string=hai) anos
pai
achega
2b43ad3c11
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      components/ipa/core/src/wlan_ipa_main.c

+ 10 - 0
components/ipa/core/src/wlan_ipa_main.c

@@ -378,6 +378,11 @@ void ipa_uc_force_pipe_shutdown(struct wlan_objmgr_pdev *pdev)
 {
 	struct wlan_ipa_priv *ipa_obj;
 
+	if (!pdev) {
+		ipa_debug("objmgr pdev is null!");
+		return;
+	}
+
 	if (!ipa_config_is_enabled()) {
 		ipa_debug("ipa is disabled");
 		return;
@@ -615,6 +620,11 @@ void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
 {
 	struct wlan_ipa_priv *ipa_obj;
 
+	if (!pdev) {
+		ipa_debug("objmgr pdev is null!");
+		return;
+	}
+
 	ipa_obj = ipa_pdev_get_priv_obj(pdev);
 	if (!ipa_obj) {
 		ipa_err("IPA object is NULL");