瀏覽代碼

qcacld-3.0: Add additional check for dp thread deinit

In DP thread create failure path, thread de-init logic
doesn't check thread is really running or not, but sends
an shutdown event and wait for completion. This will cause
completion timeout and lead crash. Change adds additional
check for theard stats before sending event.

Change-Id: Ie8e07ba3b6f992a34e9b4b3bbc36b8080157a408
CRs-Fixed: 3280401
Yu Tian 2 年之前
父節點
當前提交
1a68a41dfa
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      core/dp/txrx3.0/dp_rx_thread.c

+ 4 - 2
core/dp/txrx3.0/dp_rx_thread.c

@@ -1291,7 +1291,8 @@ static QDF_STATUS dp_rx_tm_shutdown(struct dp_rx_tm_handle *rx_tm_hdl)
 	int i;
 
 	for (i = 0; i < rx_tm_hdl->num_dp_rx_threads; i++) {
-		if (!rx_tm_hdl->rx_thread[i])
+		if (!rx_tm_hdl->rx_thread[i] ||
+		    rx_tm_hdl->state == DP_RX_THREADS_INVALID)
 			continue;
 		qdf_set_bit(RX_SHUTDOWN_EVENT,
 			    &rx_tm_hdl->rx_thread[i]->event_flag);
@@ -1302,7 +1303,8 @@ static QDF_STATUS dp_rx_tm_shutdown(struct dp_rx_tm_handle *rx_tm_hdl)
 
 
 	for (i = 0; i < rx_tm_hdl->num_dp_rx_threads; i++) {
-		if (!rx_tm_hdl->rx_thread[i])
+		if (!rx_tm_hdl->rx_thread[i] ||
+		    rx_tm_hdl->state == DP_RX_THREADS_INVALID)
 			continue;
 		dp_debug("waiting for shutdown of thread %d", i);
 		qdf_wait_single_event(&rx_tm_hdl->rx_thread[i]->shutdown_event,