Wrap all installd operations in lock.
Historically installd has a single lock up in the framework, but
we're starting to call in from multiple locations, so installd needs
to protect itself.
This specifically applies to any disk measurement requests, which
use the optimized fts(3) mode which uses chdir() internally.
Test: builds, boots, common operations work
Bug: 34330051
Change-Id: Ic746ea890ebcc7b2bf923404874b04dbc19d42ad
diff --git a/cmds/installd/InstalldNativeService.h b/cmds/installd/InstalldNativeService.h
index 5397a74..ec81462 100644
--- a/cmds/installd/InstalldNativeService.h
+++ b/cmds/installd/InstalldNativeService.h
@@ -99,6 +99,9 @@
const std::string& outputPath);
binder::Status deleteOdex(const std::string& apkPath, const std::string& instructionSet,
const std::string& outputPath);
+
+private:
+ std::recursive_mutex mLock;
};
} // namespace installd