Remove spinlock contexts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 28s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 28s
This commit is contained in:
@@ -25,18 +25,17 @@
|
||||
|
||||
static void* sys_get_user_buffer (struct proc* proc, uintptr_t uvaddr, size_t size) {
|
||||
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
|
||||
spin_lock_ctx_t ctxpg;
|
||||
|
||||
spin_lock (&proc->procgroup->lock, &ctxpg);
|
||||
spin_lock (&proc->procgroup->lock);
|
||||
|
||||
if (!mm_validate_buffer (&proc->procgroup->pd, (uintptr_t)uvaddr, size)) {
|
||||
spin_unlock (&proc->procgroup->lock, &ctxpg);
|
||||
spin_unlock (&proc->procgroup->lock);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uintptr_t out_paddr = mm_v2p (&proc->procgroup->pd, uvaddr);
|
||||
|
||||
spin_unlock (&proc->procgroup->lock, &ctxpg);
|
||||
spin_unlock (&proc->procgroup->lock);
|
||||
|
||||
uintptr_t out_kvaddr = (uintptr_t)hhdm->offset + out_paddr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user