sched: enforce ref-counting on current task/thread pointers
This commit is contained in:
+5
-2
@@ -19,8 +19,8 @@ void panic_irq(struct ml_cpu_context *ctx, const char *fmt, ...)
|
||||
printk("---[ kernel panic: %s", buf);
|
||||
printk("kernel: " BUILD_ID ", compiler version: " __VERSION__);
|
||||
|
||||
struct task *task = current_task();
|
||||
struct thread *thr = current_thread();
|
||||
struct task *task = get_current_task();
|
||||
struct thread *thr = get_current_thread();
|
||||
|
||||
if (task && thr) {
|
||||
printk("task: %s (id: %d, thread: %d)",
|
||||
@@ -31,6 +31,9 @@ void panic_irq(struct ml_cpu_context *ctx, const char *fmt, ...)
|
||||
printk("task: [bootstrap]");
|
||||
}
|
||||
|
||||
put_current_thread(thr);
|
||||
put_current_task(task);
|
||||
|
||||
printk("cpu: %u", this_cpu());
|
||||
|
||||
ml_print_cpu_state(ctx);
|
||||
|
||||
Reference in New Issue
Block a user