Kernel: Remove SmapDisabler in sys$create_shared_buffer()

This commit is contained in:
Andreas Kling 2020-02-18 14:12:39 +01:00
parent 9aa234cc47
commit bead20c40f
Notes: sideshowbarker 2024-07-19 09:13:46 +09:00

View file

@ -3529,10 +3529,7 @@ int Process::sys$create_shared_buffer(int size, void** buffer)
shared_buffer->share_with(m_pid);
void* address = shared_buffer->ref_for_process_and_get_address(*this);
{
SmapDisabler disabler;
*buffer = address;
}
copy_to_user(buffer, &address);
ASSERT((int)shared_buffer->size() >= size);
#ifdef SHARED_BUFFER_DEBUG
kprintf("%s(%u): Created shared buffer %d @ %p (%u bytes, vmobject is %u)\n", name().characters(), pid(), shared_buffer_id, *buffer, size, shared_buffer->size());