1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00

Kernel: Remove SmapDisablers in {peek,poke}_user_data()

This commit is contained in:
Andreas Kling 2020-04-14 09:52:49 +02:00
parent 0f760797a7
commit 9962db5bf8
Notes: sideshowbarker 2024-07-19 07:36:47 +09:00

View file

@ -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);