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

Skip to content
Commit 5a1a12bf authored by Atneya Nair's avatar Atneya Nair
Browse files

Fix modelUnload deadlock

The concurrency policy for this module is that the lock should not be
held while calling stopRecognition and unloadModel into the HAL --
however, that was not being observed for unloadModel.

Update the framework state under the lock, and then drop it to call
unloadModel on the HAL interface. There are no post-conditions on the
STHAL call that the framework cares about, so this we don't need an
unloading state, and this is safe.

There could be an issue if we state protected the onModelUnloaded
callback, but the current implementation fails to do this regardless
(leaves it up to the callers), so it is not an issue.

Fixes: 374908863
Test: compiles
Flag: EXEMPT trivial bugfix
Change-Id: I625af495bb28baf6cdccd1916eda772889e71597
parent 0f09c2f4
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