oomd: fix off-by-one when dumping kill candidates
authorNick Rosbrook <nick.rosbrook@canonical.com>
Wed, 20 Jul 2022 15:16:37 +0000 (11:16 -0400)
committerNick Rosbrook <nick.rosbrook@canonical.com>
Fri, 26 Aug 2022 16:40:58 +0000 (12:40 -0400)
commitb814de305445f59baa289ab926cbe6ca05ac26a4
tree8d6a9a4c3a111e821bd4b99615c98871a8b1f7c4
parent58b2f0d1f578f4209e97f1f6c4bbe9c7c2aeb334
oomd: fix off-by-one when dumping kill candidates

When we kill a cgroup that is towards the end of the sorted candidate
list (i.e. when we have to resort to killing a candidate with
ManagedOOMPreference=avoid), this cgroup is not logged in the candidate
list. This is due to an off-by-one error when assigning dump_until.
src/oom/oomd-util.c