mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +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
|
@ -712,8 +712,8 @@ ErrorOr<void> Process::do_exec(NonnullRefPtr<OpenFileDescription> main_program_d
|
|||
// NOTE: Be careful to not trigger any page faults below!
|
||||
|
||||
with_mutable_protected_data([&](auto& protected_data) {
|
||||
protected_data.promises = protected_data.execpromises.load();
|
||||
protected_data.has_promises = protected_data.has_execpromises.load();
|
||||
protected_data.promises = protected_data.execpromises;
|
||||
protected_data.has_promises = protected_data.has_execpromises;
|
||||
|
||||
protected_data.execpromises = 0;
|
||||
protected_data.has_execpromises = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue