Просмотр исходного кода

msm: ipa: Fix deleting the TX napi context

TX napi context is a mutable variable and so must be deleted
whenever the pipe is disconnected. Otherwise we will see a
memory leak.

Change-Id: I9309130c786e1092fd1a717359774fca9a37fcd1
Signed-off-by: Chaitanya Pratapa <[email protected]>
Chaitanya Pratapa 4 лет назад
Родитель
Сommit
376242c944
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

+ 6 - 0
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

@@ -1450,6 +1450,12 @@ int ipa3_teardown_sys_pipe(u32 clnt_hdl)
 		} while (1);
 		} while (1);
 
 
 		delete_avail_tx_wrapper_list(ep);
 		delete_avail_tx_wrapper_list(ep);
+		/* Delete NAPI TX object. For WAN_PROD, it is deleted
+		 * in rmnet_ipa driver.
+		 */
+		if (ipa3_ctx->tx_napi_enable &&
+			(ep->client != IPA_CLIENT_APPS_WAN_PROD))
+			netif_napi_del(&ep->sys->napi_tx);
 	}
 	}
 
 
 	/* channel stop might fail on timeout if IPA is busy */
 	/* channel stop might fail on timeout if IPA is busy */