Kernel: Always protect process data immediately after construction

This commit is contained in:
Andreas Kling 2021-03-11 14:46:27 +01:00
parent 49a0f40ff0
commit 9853a9bc8a

View file

@ -227,6 +227,9 @@ Process::Process(RefPtr<Thread>& 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;