From 55c047fd4407b2707eee48c3cdb56f63b3229a9b Mon Sep 17 00:00:00 2001 From: Chungkai Mei Date: Mon, 5 Aug 2024 05:16:20 +0000 Subject: [PATCH] libmodprobe: use ordered map for deterministic module loading To ensure stable loading of parallel modules, switch to an ordered map structure. This will prevent potential dependency issues and conflicts. Bug: 314213605 Change-Id: I8e00678e18417550b3be0c4228e4908a830e648c Signed-off-by: Chungkai Mei --- libmodprobe/libmodprobe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmodprobe/libmodprobe.cpp b/libmodprobe/libmodprobe.cpp index 1a40da122..8cc0b9b2e 100644 --- a/libmodprobe/libmodprobe.cpp +++ b/libmodprobe/libmodprobe.cpp @@ -447,7 +447,7 @@ bool Modprobe::IsBlocklisted(const std::string& module_name) { // Softdeps are taken care in InsmodWithDeps(). bool Modprobe::LoadModulesParallel(int num_threads) { bool ret = true; - std::unordered_map> mod_with_deps; + std::map> mod_with_deps; // Get dependencies for (const auto& module : module_load_) {