Selaa lähdekoodia

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 vuotta sitten
vanhempi
sitoutus
1a68a41dfa
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  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,