Re: [PATCH] cgroup: Fix potential race between cgroup_exit and cpuset_attach

From: Tejun Heo
Date: Wed Aug 30 2017 - 21:10:35 EST


Hello,

On Wed, Aug 30, 2017 at 06:23:50PM +0530, Neeraj Upadhyay wrote:
> cpuset_hotplug_workfn()
> cgroup_transfer_tasks()
> cgroup_migrate()
> cgroup_migrate_execute()
> <TASK EXIT>
> list_del_init(&task->cg_list)
> cpuset_attach()
> cgroup_taskset_first(tset, &css) // css is not set
> guarantee_online_mems(cs, ...) // data abort

I don't think this can happen anymore. We lock out task exits during
migration and don't call migration callbacks if there's no tasks to
migrate.

Thanks.

--
tejun