Procházet zdrojové kódy

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.
Andreas Kling před 4 roky
rodič
revize
9ec9d20e84
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      Kernel/Syscalls/purge.cpp

+ 2 - 1
Kernel/Syscalls/purge.cpp

@@ -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;
             });
         }