summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
author Atneya Nair <atneya@google.com> 2024-11-04 12:19:20 -0800
committer Atneya Nair <atneya@google.com> 2024-11-04 12:19:20 -0800
commit5a1a12bfd81aa1810e91fefa6b12a7a3de322eee (patch)
tree539aa3e0b83bef4af22ae749c7aae1fa7c44f498 /libs/androidfw/ObbFile.cpp
parent0f09c2f475d06e6802085755aa3fffe729f3a256 (diff)
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
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions