Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ad02249 authored by Gurpreet Ghai's avatar Gurpreet Ghai Committed by Jacky Cheung
Browse files

Serialize stack shutdown, state change callback and cleanup

Use Case: Bluetooth On/Off scenario, User switch

Steps:
1. Turn ON Bluetooth
2. Switch user
Also observed on occurrence of enable/disable timeout during On/Off testing.

Failure: Crash while sending state change HAL callback.

Root Cause: In the event when stack cleanup is queued to stack manager
thread when stack shutdown is being processed, stack cleanup starts
execution as soon as stack shutdown is finished.
If the function event_signal_stack_down posted to btif thread at the
end of stack shutdown is executed after stack cleanup crash occurs.

Fix: Serialized the execution of stack shutdown, state change callback
execution and stack cleanup to happen in same order.

Test: code compilation.

Change-Id: Ic96205b5c304acb44eab53f4e2cb150726643bda
(cherry picked from commit eae6d92f)
parent 5307fad7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment