Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Commit cd8f73d

Browse files
rohith2xssysopenci
authored andcommitted
Adding Mutex Lock to Avoid Race Condition
The following fields encountered a race condition. Adding a `mutex_lock` in the critical section resolves the issue: - `drv->event_thread` Tests: - Android boot up success - WiFi/Hotspot ON/OFF success - Connect WiFi to network success Tracked-On: OAM-131040 Signed-off-by: rohith2xs <rohith2x.s@intel.com>
1 parent a68aed3 commit cd8f73d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/driver_if.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,8 +2041,10 @@ void driver_if_events(void *handle)
20412041
return;
20422042
}
20432043

2044+
MUTEX_LOCK(&drv->sync);
20442045
hal_printf(MSG_DEBUG, "Starting event loop tid=%u",
20452046
drv->event_thread);
2047+
MUTEX_UNLOCK(&drv->sync);
20462048

20472049
while (! [&]()-> bool {
20482050
MUTEX_LOCK(&drv->sync);

0 commit comments

Comments
 (0)