sched: enforce ref-counting on current task/thread pointers
This commit is contained in:
+2
-1
@@ -376,7 +376,7 @@ static kern_status_t request_page(
|
||||
req.req_type = PAGE_REQUEST_READ;
|
||||
req.req_offset = offset;
|
||||
req.req_length = vm_page_order_to_bytes(VM_PAGE_4K);
|
||||
req.req_sender = current_thread();
|
||||
req.req_sender = get_current_thread();
|
||||
|
||||
object_ref(&vo->vo_base);
|
||||
req.req_object = vo->vo_key;
|
||||
@@ -388,6 +388,7 @@ static kern_status_t request_page(
|
||||
kern_status_t status
|
||||
= vm_controller_send_request(ctrl, &req, irq_flags);
|
||||
|
||||
put_current_thread(req.req_sender);
|
||||
spin_unlock(&req.req_lock);
|
||||
vm_controller_unlock_irqrestore(ctrl, *irq_flags);
|
||||
object_unref(&vo->vo_base);
|
||||
|
||||
Reference in New Issue
Block a user