소스 검색

qcacld-3.0: Fix race condition in refill thread cleanup

During refill thread cleanup shutdown event is posted and
we wait for thread to handle the shutdown event and exit.
But while posting shutdown event if refill thread is in running
state then there is chance of shutdown event not getting handled
and thread cleanup will be waiting indefinitely for thread to
exit.

Change-Id: I45bdad8d6a85b110ed7c7e206d3c79c5c03e9d98
CRs-Fixed: 3599295
Karthik Kantamneni 1 년 전
부모
커밋
6f177b8539
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      components/dp/core/src/wlan_dp_rx_thread.c

+ 1 - 1
components/dp/core/src/wlan_dp_rx_thread.c

@@ -763,9 +763,9 @@ static int dp_rx_refill_thread_loop(void *arg)
 			QDF_DEBUG_PANIC("wait_event_interruptible returned -ERESTARTSYS");
 			break;
 		}
-		dp_rx_refill_thread_sub_loop(rx_thread, &shutdown);
 		qdf_atomic_clear_bit(RX_REFILL_POST_EVENT,
 				     &rx_thread->event_flag);
+		dp_rx_refill_thread_sub_loop(rx_thread, &shutdown);
 	}
 
 	/* If we get here the scheduler thread must exit */