Parcourir la source

msm: ipa3: fixed memory leak

SMMU mapping resources are not freed as part of wdi disconnect.

Change-Id: I702ac3bc0b5643424d051c45ec607d925f9c369d
Signed-off-by: sivakanth vaka <[email protected]>
Sivakanth vaka il y a 5 ans
Parent
commit
b93346f3ba
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      drivers/platform/msm/ipa/ipa_v3/ipa_wdi3_i.c

+ 3 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_wdi3_i.c

@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Copyright (c) 2018 - 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018 - 2020, The Linux Foundation. All rights reserved.
  */
 
 #include "ipa_i.h"
@@ -705,6 +705,7 @@ int ipa3_disconn_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
 		IPAERR("failed to release gsi channel: %d\n", result);
 		goto exit;
 	}
+	ipa3_release_wdi3_gsi_smmu_mappings(IPA_WDI3_TX_DIR);
 
 	memset(ep_tx, 0, sizeof(struct ipa3_ep_context));
 	IPADBG("tx client (ep: %d) disconnected\n", ipa_ep_idx_tx);
@@ -725,6 +726,7 @@ int ipa3_disconn_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
 		IPAERR("failed to release gsi channel: %d\n", result);
 		goto exit;
 	}
+	ipa3_release_wdi3_gsi_smmu_mappings(IPA_WDI3_RX_DIR);
 
 	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5)
 		ipa3_uc_debug_stats_dealloc(IPA_HW_PROTOCOL_WDI3);