mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
Kernel: Always protect process data immediately after construction
This commit is contained in:
parent
49a0f40ff0
commit
9853a9bc8a
1 changed files with 3 additions and 0 deletions
|
@ -227,6 +227,9 @@ Process::Process(RefPtr<Thread>& first_thread, const String& name, uid_t uid, gi
|
||||||
, m_tty(tty)
|
, m_tty(tty)
|
||||||
, m_wait_block_condition(*this)
|
, m_wait_block_condition(*this)
|
||||||
{
|
{
|
||||||
|
// Ensure that we protect the process data when exiting the constructor.
|
||||||
|
ProtectedDataMutationScope scope { *this };
|
||||||
|
|
||||||
m_pid = allocate_pid();
|
m_pid = allocate_pid();
|
||||||
m_ppid = ppid;
|
m_ppid = ppid;
|
||||||
m_uid = uid;
|
m_uid = uid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue