Files
kubernetes/pkg/kubelet
Francesco Romani 369416b763 cm: handle nil cpumanager avoiding segfault
If the cpumanager feature gate is disabled, the corresponsing field
of the containerManager will be nil.
A couple functions don't check for this occurrence and happily
deference the pointer unconditionally, leading to possible segfaults.

The relevant functions were introduced to support the podresources API,
so to trigger this segfault all the following are needed:
- cpumanager feature gate has to be disabled explicitely
- any podresources API must be called

Worth pointing out that when the new functions were introduced (around
kubernetes 1.20) the default feature gate for cpumanager was already set
to true, hence this bug is expected to be triggered rarely.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-06-10 16:22:43 +02:00
..
2021-02-28 15:17:29 -08:00
2021-02-28 15:17:29 -08:00
2021-06-01 15:19:44 +08:00
2021-02-28 15:17:29 -08:00
2021-05-25 09:04:46 +02:00
2021-02-28 15:17:29 -08:00
2021-02-28 15:17:29 -08:00
2021-02-28 15:17:29 -08:00
2021-02-28 15:17:29 -08:00
2021-04-21 10:35:23 +02:00
2021-02-28 15:17:29 -08:00
2021-02-28 15:17:29 -08:00
2020-07-24 16:23:12 -04:00