Skip to content
Snippets Groups Projects
Commit 18e86afd authored by Kamal Negi's avatar Kamal Negi Committed by Andre Eisenbach
Browse files

Set alarm's queue to NULL on alarm expired

Use Case: Repeated BT ON/OFF

Failure: ANR due to race condition between random advertisement
address generation completion(adv_raddr_timer) and BT shutdown.

Steps: SNS Stress testing.

Root Cause: Race condition happens between random advertisement
address generation completion(adv_raddr_timer) and BT shutdown.

Fix:  For non-periodic alarms, set alarm's queue to NULL once alarm
expired.

Test: mm -j8

Change-Id: Idf8e2bebdc2ca7621aef06dd5f2075ef2c5fa08c
parent 72728794
No related branches found
No related tags found
No related merge requests found
......@@ -563,6 +563,7 @@ static void alarm_queue_ready(fixed_queue_t* queue, UNUSED_ATTR void* context) {
alarm->deadline = 0;
alarm->callback = NULL;
alarm->data = NULL;
alarm->queue = NULL;
}
std::lock_guard<std::recursive_mutex> cb_lock(*alarm->callback_mutex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment