On 03/11, Oleg Nesterov wrote: > > > > @@ -2289,10 +2289,9 @@ static int select_fallback_rq(int cpu, s > > > > > > /* No more Mr. Nice Guy. */ > > > if (dest_cpu >= nr_cpu_ids) { > > > - rcu_read_lock(); > > > - cpuset_cpus_allowed_locked(p, &p->cpus_allowed); > > > - rcu_read_unlock(); > > > - dest_cpu = cpumask_any_and(cpu_active_mask, &p->cpus_allowed); > > > + // XXX: take cpu_rq(cpu)->lock ??? > > > + cpumask_copy(&p->cpus_allowed, cpu_possible_mask); > > > + dest_cpu = cpumask_any(cpu_active_mask); > > > > > > Right, this seems safe. > > OK, I'll try to read this code a bit more and then send this patch. No, it is not safe :/ Peter, I seem to see the simple fix for the discussed cpuset problems, but it turns out sched.c has more problems evem without cpusets. I'll try to send the whole series on Monday, but perhaps you can look at the attached compile-tested patches (especially 2 and 3) to quickly correct me if the 3rd one is wrong. The subsequent fix in cpuset.c depends on the locking rules enforced by 2-3. Oleg.