Merge "Revert "host_init_verifier: add check for root services and linux capabilities""
diff --git a/libcutils/ashmem_test.cpp b/libcutils/ashmem_test.cpp
index fb657f6..d158427 100644
--- a/libcutils/ashmem_test.cpp
+++ b/libcutils/ashmem_test.cpp
@@ -75,7 +75,7 @@
unique_fd fd;
ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE));
- void *region1;
+ void* region1 = nullptr;
ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, ®ion1));
memcpy(region1, &data, size);
@@ -97,7 +97,7 @@
unique_fd fd;
ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE));
- void *region1;
+ void* region1 = nullptr;
ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, ®ion1));
memcpy(region1, &data, size);
@@ -131,7 +131,7 @@
TEST(AshmemTest, FileOperationsTest) {
unique_fd fd;
- void* region;
+ void* region = nullptr;
// Allocate a 4-page buffer, but leave page-sized holes on either side
constexpr size_t size = PAGE_SIZE * 4;
@@ -246,7 +246,7 @@
unique_fd fd[nRegions];
for (int i = 0; i < nRegions; i++) {
ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd[i], PROT_READ | PROT_WRITE));
- void *region;
+ void* region = nullptr;
ASSERT_NO_FATAL_FAILURE(TestMmap(fd[i], size, PROT_READ | PROT_WRITE, ®ion));
memcpy(region, &data, size);
ASSERT_EQ(0, memcmp(region, &data, size));
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 45ac99c..1da69ba 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -471,6 +471,11 @@
*max_processes = processes;
}
LOG(VERBOSE) << "Killed " << processes << " processes for processgroup " << initialPid;
+ if (!CgroupsAvailable()) {
+ // makes no sense to retry, because there are no cgroup_procs file
+ processes = 0; // no remaining processes
+ break;
+ }
if (retry > 0) {
std::this_thread::sleep_for(5ms);
--retry;
diff --git a/libprocessgroup/profiles/task_profiles.json b/libprocessgroup/profiles/task_profiles.json
index c485097..4b8fc19 100644
--- a/libprocessgroup/profiles/task_profiles.json
+++ b/libprocessgroup/profiles/task_profiles.json
@@ -80,17 +80,20 @@
{
"Name": "BfqWeight",
"Controller": "io",
- "File": "io.bfq.weight"
+ "File": "blkio.bfq.weight",
+ "FileV2": "io.bfq.weight"
},
{
"Name": "CfqGroupIdle",
"Controller": "io",
- "File": "io.group_idle"
+ "File": "blkio.group_idle",
+ "FileV2": "io.group_idle"
},
{
"Name": "CfqWeight",
"Controller": "io",
- "File": "io.weight"
+ "File": "blkio.weight",
+ "FileV2": "io.weight"
}
],
diff --git a/libutils/Android.bp b/libutils/Android.bp
index b07058a..162f0f4 100644
--- a/libutils/Android.bp
+++ b/libutils/Android.bp
@@ -21,11 +21,13 @@
vendor_ramdisk_available: true,
host_supported: true,
native_bridge_supported: true,
+ defaults: [
+ "apex-lowest-min-sdk-version",
+ ],
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
- min_sdk_version: "apex_inherit",
header_libs: [
"libbase_headers",
@@ -124,7 +126,10 @@
cc_defaults {
name: "libutils_impl_defaults",
- defaults: ["libutils_defaults"],
+ defaults: [
+ "libutils_defaults",
+ "apex-lowest-min-sdk-version",
+ ],
native_bridge_supported: true,
srcs: [
@@ -167,7 +172,6 @@
"//apex_available:anyapex",
"//apex_available:platform",
],
- min_sdk_version: "apex_inherit",
afdo: true,
}