summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorHugo Benichi <hugobenichi@google.com>2017-04-10 09:41:10 +0900
committerHugo Benichi <hugobenichi@google.com>2017-04-10 09:56:23 +0900
commit446c9c9172684c4653ef33a8eb8b769ba0331807 (patch)
tree70a1f22d151ce594d4e0758f9c4947ecb845aff4 /rs/java/android/renderscript/ProgramStore.java
parent34cb00ac83164bdf3b3fd4d5ef6ed3cf20c92833 (diff)
NetworkPolicyManagerService: fix deadlock
Callers of addNetworkPolicy() were not taking locks in the correct order inside NetworkPolicyManagerService: - addNetworkPolicy() is an internal method that calls setNetworkPolicies which takes both mUidRulesFirstLock and mNetworkPoliciesSecondLock in order. - both callers of addNetworkPolicy, mWifiStateReceiver and mConnReceiver via ensureActiveMobilePolicy, were taking mNetworkPoliciesSecondLock before calling addNetworkPolicy. - this causes the order of locking to be reversed, which can cause a deadlock when another concurrent codepath in NetworkPolicyManagerService tries to take both locks in the correct order. This patch fixes this issue by wrapping both problematic codepaths into addNetworkPolicy() with a lock on mUidRulesFirstLock. Test: build, flashed, NetworkPolicyManagerServiceTest passes Bug: 36972283 Change-Id: If7888c11aef8b628e1b013224075c4c75eae0022
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions