+7
kernel/cpu.c
+7
kernel/cpu.c
···
31
31
#include <linux/smpboot.h>
32
32
#include <linux/relay.h>
33
33
#include <linux/slab.h>
34
+
#include <linux/scs.h>
34
35
#include <linux/percpu-rwsem.h>
35
36
#include <linux/cpuset.h>
36
37
···
587
586
{
588
587
struct task_struct *idle = idle_thread_get(cpu);
589
588
int ret;
589
+
590
+
/*
591
+
* Reset stale stack state from the last time this CPU was online.
592
+
*/
593
+
scs_task_reset(idle);
594
+
kasan_unpoison_task_stack(idle);
590
595
591
596
/*
592
597
* Some architectures have to walk the irq descriptors to
-4
kernel/sched/core.c
-4
kernel/sched/core.c
···
8619
8619
idle->flags |= PF_IDLE | PF_KTHREAD | PF_NO_SETAFFINITY;
8620
8620
kthread_set_per_cpu(idle, cpu);
8621
8621
8622
-
scs_task_reset(idle);
8623
-
kasan_unpoison_task_stack(idle);
8624
-
8625
8622
#ifdef CONFIG_SMP
8626
8623
/*
8627
8624
* It's possible that init_idle() gets called multiple times on a task,
···
8774
8777
finish_arch_post_lock_switch();
8775
8778
}
8776
8779
8777
-
scs_task_reset(current);
8778
8780
/* finish_cpu(), as ran on the BP, will clean up the active_mm state */
8779
8781
}
8780
8782