sched: enforce ref-counting on current task/thread pointers

This commit is contained in:
2026-04-01 18:17:05 +01:00
parent 15c2207ab9
commit 512356ac2d
28 changed files with 364 additions and 103 deletions
+2 -1
View File
@@ -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);