GpuService: secure setUpdatableDriverPath
setUpdatableDriverPath should only be called by system_server and
developer driver path needs to be protected by a lock.
Bug: 162383705
Bug: 159240322
Test: ./gapit validate_gpu_profiling --os android
Change-Id: I48896325598acab89079dbc658ddf9b92d303244
diff --git a/services/gpuservice/GpuService.h b/services/gpuservice/GpuService.h
index 43faa3e..409084b 100644
--- a/services/gpuservice/GpuService.h
+++ b/services/gpuservice/GpuService.h
@@ -79,7 +79,8 @@
std::shared_ptr<GpuMem> mGpuMem;
std::unique_ptr<GpuStats> mGpuStats;
std::unique_ptr<GpuMemTracer> mGpuMemTracer;
- std::string developerDriverPath;
+ std::mutex mLock;
+ std::string mDeveloperDriverPath;
};
} // namespace android