From f6da48c98937d1303821eb373b3255e5e4af2ab2 Mon Sep 17 00:00:00 2001 From: Adithya R Date: Mon, 9 Sep 2024 06:44:03 +0530 Subject: [PATCH] init: Use the correct check for updatable service We should trigger updatable process crashing only if it is really an updatable service, which is returned by is_updatable(). Without this change, nearly all services are considered as updatable and will trigger an apex update rollback if crashed, even when its completely unnecessary. Change-Id: I3cddbce48b2f043a91064569b9c4f5066368fc1e --- init/service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/service.cpp b/init/service.cpp index caf971c4e..e956e9ea6 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -330,7 +330,7 @@ void Service::Reap(const siginfo_t& siginfo) { #endif const bool use_default_mount_ns = mount_namespace_.has_value() && *mount_namespace_ == NS_DEFAULT; - const bool is_process_updatable = use_default_mount_ns && is_apex_updatable; + const bool is_process_updatable = use_default_mount_ns && is_apex_updatable && is_updatable(); #if defined(__BIONIC__) && defined(SEGV_MTEAERR) // As a precaution, we only upgrade a service once per reboot, to limit