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.
continue; /* Try to find something else to kill */
}
- dump_until = MAX(dump_until, i);
+ dump_until = MAX(dump_until, i + 1);
char *selected = strdup(sorted[i]->path);
if (!selected)
return -ENOMEM;
continue; /* Try to find something else to kill */
}
- dump_until = MAX(dump_until, i);
+ dump_until = MAX(dump_until, i + 1);
char *selected = strdup(sorted[i]->path);
if (!selected)
return -ENOMEM;