mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Always protect process data immediately after construction
This commit is contained in:
parent
49a0f40ff0
commit
9853a9bc8a
Notes:
sideshowbarker
2024-07-18 21:31:13 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9853a9bc8ac
@ -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…
Reference in New Issue
Block a user