mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
Kernel: Remove SmapDisablers in {peek,poke}_user_data()
This commit is contained in:
parent
0f760797a7
commit
9962db5bf8
1 changed files with 2 additions and 6 deletions
|
@ -4940,11 +4940,10 @@ KResultOr<u32> Process::peek_user_data(u32* address)
|
|||
}
|
||||
uint32_t result;
|
||||
|
||||
SmapDisabler dis;
|
||||
// This function can be called from the context of another
|
||||
// process that called PT_PEEK
|
||||
ProcessPagingScope scope(*this);
|
||||
result = *address;
|
||||
copy_from_user(&result, address);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -4975,10 +4974,7 @@ KResult Process::poke_user_data(u32* address, u32 data)
|
|||
region->remap();
|
||||
}
|
||||
|
||||
{
|
||||
SmapDisabler dis;
|
||||
*address = data;
|
||||
}
|
||||
copy_to_user(address, &data);
|
||||
|
||||
if (!was_writable) {
|
||||
region->set_writable(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue