RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v2]

Severin Gehwolf sgehwolf at openjdk.org
Tue Aug 27 18:50:05 UTC 2024


On Tue, 27 Aug 2024 14:05:57 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>> 
>>  - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>>  - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>>  - Remove some duplication
>>  - Fix style
>>  - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>>  - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>>  - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>>  - 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected
>
> src/hotspot/os/linux/cgroupUtil_linux.cpp line 64:
> 
>> 62:   jlong limit = mem->read_memory_limit_in_bytes(phys_mem);
>> 63:   bool path_iterated = false;
>> 64:   while (limit < 0 && (last_slash = strrchr(cg_path, '/')) != cg_path) {
> 
> Is it guaranteed that cg_path starts with / ? otherwise, you have a write-to-NULL below. maybe assert that `cg_path[0] == '/'`

Yes, that should be guaranteed. The assertion is a good idea. Added.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20646#discussion_r1733362405


More information about the hotspot-runtime-dev mailing list