1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:07:43 +00:00

Fix some paging related bugs exposed by the spawn stress test.

- Process::exec() needs to restore the original paging scope when called
  on a non-current process.
- Add missing InterruptDisabler guards around g_processes access.
- Only flush the TLB when modifying the active page tables.
This commit is contained in:
Andreas Kling 2018-11-09 01:25:31 +01:00
parent 7b96218389
commit e71cb1c56b
13 changed files with 110 additions and 67 deletions

View file

@ -67,6 +67,9 @@ public:
return m_state == BlockedSleep || m_state == BlockedWait || m_state == BlockedRead;
}
PageDirectory& page_directory() { return *m_page_directory; }
const PageDirectory& page_directory() const { return *m_page_directory; }
bool in_kernel() const { return (m_tss.cs & 0x03) == 0; }
static Process* from_pid(pid_t);
@ -162,7 +165,7 @@ public:
static void initialize();
void crash() NORETURN;
static void reap(pid_t);
static void reap(Process&);
const TTY* tty() const { return m_tty; }