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
This commit is contained in:
Adithya R 2024-09-09 06:44:03 +05:30
parent d46c1bffa9
commit f6da48c989
1 changed files with 1 additions and 1 deletions

View File

@ -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