RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v3]

Maxim Kartashev mkartashev at openjdk.java.net
Thu May 26 16:04:17 UTC 2022


> Following the logic from the comment directly above the changed line, since it doesn't matter which controller we pick, pick any available controller instead of the one called "memory" specifically. This way we are guarded against getting `null` as `anyController`, which is being immediately passed down to `CgroupV2Subsystem.getInstance()` that is unprepared to accept `null` values. 
> 
> It is also worth noting that the previous checks (such as that at line 89) make sure that there exist at least one controller in the map.

Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:

  Made requested changes

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8803/files
  - new: https://git.openjdk.java.net/jdk/pull/8803/files/932ff6d1..9e6c0f37

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8803&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8803&range=01-02

  Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8803.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8803/head:pull/8803

PR: https://git.openjdk.java.net/jdk/pull/8803


More information about the core-libs-dev mailing list