Re: [PATCH 2/6] move_task_off_dead_cpu: take rq->lock aroundselect_fallback_rq()

From: Peter Zijlstra
Date: Wed Mar 24 2010 - 11:41:59 EST


On Mon, 2010-03-15 at 10:10 +0100, Oleg Nesterov wrote:
> static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p)
> {
> + struct rq *rq = cpu_rq(dead_cpu);
> + int needs_cpu, dest_cpu;
> + unsigned long flags;
> again:
> + local_irq_save(flags);
> +
> + raw_spin_lock(&rq->lock);
> + needs_cpu = (task_cpu(p) == dead_cpu) && (p->state != TASK_WAKING);

^
kernel/sched.c:5445: warning: âdest_cpuâ may be used uninitialized in this function

> + if (needs_cpu)
> + dest_cpu = select_fallback_rq(dead_cpu, p);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/