diff options
| author | 2020-12-11 17:24:19 +0000 | |
|---|---|---|
| committer | 2020-12-11 17:24:19 +0000 | |
| commit | e0dbd9b05cefcd2588654e8e91b9a85386cf5ffc (patch) | |
| tree | e427589a8b7dba756c74f246e5542d2395bf737c | |
| parent | 633e1fbfedac66919a1e960640aa29376dd886dd (diff) | |
Revert "Revert "installd: Fix set dex2oat to background after boot_complete""
This reverts commit 633e1fbfedac66919a1e960640aa29376dd886dd.
Bug: 175381211
Reason for revert: b/175381211 should be resolved after omg/25953 fixed
Change-Id: I494ccc485ab5a125ba2a92064c0ee33e7fb6d2e6
| -rw-r--r-- | cmds/installd/dexopt.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp index 594880ac60..65fc46ecaf 100644 --- a/cmds/installd/dexopt.cpp +++ b/cmds/installd/dexopt.cpp @@ -1818,10 +1818,13 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins pid_t pid = fork(); if (pid == 0) { + // Need to set schedpolicy before dropping privileges + // for cgroup migration. See details at b/175178520. + SetDex2OatScheduling(boot_complete); + /* child -- drop privileges before continuing */ drop_capabilities(uid); - SetDex2OatScheduling(boot_complete); if (flock(out_oat.fd(), LOCK_EX | LOCK_NB) != 0) { PLOG(ERROR) << "flock(" << out_oat.path() << ") failed"; _exit(DexoptReturnCodes::kFlock); |