diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 497025a9c2..e04bbde461 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -227,6 +227,9 @@ Process::Process(RefPtr& first_thread, const String& name, uid_t uid, gi , m_tty(tty) , m_wait_block_condition(*this) { + // Ensure that we protect the process data when exiting the constructor. + ProtectedDataMutationScope scope { *this }; + m_pid = allocate_pid(); m_ppid = ppid; m_uid = uid;