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
+4 -2
View File
@@ -217,16 +217,18 @@ static void print_stack_trace(
void ml_print_stack_trace(uintptr_t ip)
{
struct task *task = current_task();
struct task *task = get_current_task();
struct address_space *space = task ? task->t_address_space : NULL;
uintptr_t bp;
asm volatile("mov %%rbp, %0" : "=r"(bp));
print_stack_trace(space, ip, bp);
put_current_task(task);
}
void ml_print_stack_trace_irq(struct ml_cpu_context *ctx)
{
struct task *task = current_task();
struct task *task = get_current_task();
struct address_space *space = task ? task->t_address_space : NULL;
print_stack_trace(space, ctx->rip, ctx->rbp);
put_current_task(task);
}