On 9/4/19 6:44 PM, Julien Desfossez wrote: > + > +static void coresched_idle_worker_fini(struct rq *rq) > +{ > + if (rq->core_idle_task) { > + kthread_stop(rq->core_idle_task); > + rq->core_idle_task = NULL; > + }
During testing, I have found access of rq->core_idle_task as NULL pointer from other cpus (other than the cpu executing the stop_machine function) when you toggle cpu.tag of the cgroup. Doing locking here is tricky because the rq lock is being transitioned from core lock to per run queue lock. As a fix, I made coresched_idle_worker_fini a null function, and not to null out the core_idle_task. Tim