Kernel: Fix bad VMObject iteration in sys$purge()

We were fooling ourselves into thinking all VMObjects are anonymous and
then tried to call purge() on them as if they were.
This commit is contained in:
Andreas Kling 2021-01-02 13:34:29 +01:00
parent 79328b2aba
commit 9ec9d20e84
Notes: sideshowbarker 2024-07-19 00:12:21 +09:00

View file

@ -43,7 +43,8 @@ int Process::sys$purge(int mode)
{
InterruptDisabler disabler;
MM.for_each_vmobject([&](auto& vmobject) {
vmobjects.append(vmobject);
if (vmobject.is_anonymous())
vmobjects.append(vmobject);
return IterationDecision::Continue;
});
}