summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author panhaihui <panhaihui@xiaomi.com> 2024-09-12 19:25:38 +0800
committer Sudheer Shanka <sudheersai@google.com> 2024-09-16 17:57:27 +0000
commit072bc7d6a808c91f38eb41adb392cf46e57476ad (patch)
treef3b73c41cbe542349d8359a44cf4cbfbfd68f50c /api/api.go
parent71a4fd543828c6fc562dee00670168e8481e296b (diff)
[Bugfix] avoid deadlock caused by AppBatteryTracker.dump
AppBatteryTracker.dump -> BaseAppStatePolicy.shouldExemptUid -> getBackgroundRestrictionExemptionReason -> getPotentialSystemExemptionReason -> isProfileOwner Getting mlock first in AppBatteryTracker.dump() and then getting AMS lock in isProfileOwner() is an inappropriate lock order in the above call chain. This is inconsistent with the method of getting AMS lock first and then mlock lock in most method calls, so it will cause deadlock and cause watchdog. Similar bug cases include 366150181, 358274041 Bug:366150181 Test: Manual test Change-Id: I8a1b509a1e95ad8570f3d4c248f9e0ed346962ad Signed-off-by: panhaihui <panhaihui@xiaomi.com>
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions