mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
Kernel: De-atomicize fields for promises in Process
These 4 fields were made `Atomic` inc3f668a758
, at which time these were still accessed unserialized and TOCTOU bugs could happen. Later, in8ed06ad814
, we serialized access to these fields in a number of helper methods, removing the need for `Atomic`.
This commit is contained in:
parent
7f855ad6b3
commit
81a6976e90
3 changed files with 11 additions and 11 deletions
|
@ -99,10 +99,10 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
|
|||
|
||||
with_protected_data([&](auto& my_protected_data) {
|
||||
child->with_mutable_protected_data([&](auto& child_protected_data) {
|
||||
child_protected_data.promises = my_protected_data.promises.load();
|
||||
child_protected_data.execpromises = my_protected_data.execpromises.load();
|
||||
child_protected_data.has_promises = my_protected_data.has_promises.load();
|
||||
child_protected_data.has_execpromises = my_protected_data.has_execpromises.load();
|
||||
child_protected_data.promises = my_protected_data.promises;
|
||||
child_protected_data.execpromises = my_protected_data.execpromises;
|
||||
child_protected_data.has_promises = my_protected_data.has_promises;
|
||||
child_protected_data.has_execpromises = my_protected_data.has_execpromises;
|
||||
child_protected_data.credentials = my_protected_data.credentials;
|
||||
child_protected_data.umask = my_protected_data.umask;
|
||||
child_protected_data.signal_trampoline = my_protected_data.signal_trampoline;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue