diff options
author | Charles He <qiurui@google.com> | 2016-12-01 19:22:33 +0000 |
---|---|---|
committer | Sean McCreary <mccreary@mcwest.org> | 2017-03-22 12:40:31 -0600 |
commit | 4f1644e029bddd02b633c4f66801b73c26316361 (patch) | |
tree | 3b25691f61065c9026e96e0984e70e77e814868d /services | |
parent | 2ffca13ae484c15087ddd14f69d3e593b51fc904 (diff) | |
download | frameworks_base-4f1644e029bddd02b633c4f66801b73c26316361.zip frameworks_base-4f1644e029bddd02b633c4f66801b73c26316361.tar.gz frameworks_base-4f1644e029bddd02b633c4f66801b73c26316361.tar.bz2 |
Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable.
Test: manual
Bug: 30352311
CVE-2017-0498
Change-Id: I1024f2a56badde5c123d025d6fe02f42559cbcb1
(cherry picked from commit f6f1d627483b4dad9d65176769a1ee92c59a4810)
(cherry picked from commit 71d2a41dd9c8be8c4bca5eba339802e1e0c2be3c)
(cherry picked from commit 5f621b5b1549e8379aee05807652d5111382ccc6)
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/PersistentDataBlockService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/PersistentDataBlockService.java b/services/core/java/com/android/server/PersistentDataBlockService.java index 32b183b..9346083 100644 --- a/services/core/java/com/android/server/PersistentDataBlockService.java +++ b/services/core/java/com/android/server/PersistentDataBlockService.java @@ -29,6 +29,7 @@ import android.service.persistentdata.IPersistentDataBlockService; import android.util.Slog; import com.android.internal.R; +import com.android.internal.annotations.GuardedBy; import libcore.io.IoUtils; @@ -77,6 +78,8 @@ public class PersistentDataBlockService extends SystemService { private int mAllowedUid = -1; private long mBlockDeviceSize; + + @GuardedBy("mLock") private boolean mIsWritable = true; public PersistentDataBlockService(Context context) { |