Re: [PATCH 3.14-rt] sched/numa: Fix task_numa_free() lockdep splat

From: Steven Rostedt
Date: Tue May 27 2014 - 14:52:12 EST


On Tue, 27 May 2014 20:25:41 +0200
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:


> Nope, its really IRQs.
>
> do_exit()
> exit_itimers()
> itimer_delete()
> spin_lock_irqsave(&timer->it_lock, &flags);
> timer_delete_hook(timer);
> kc->timer_del(timer) := posix_cpu_timer_del()
> put_task_struct()
> __put_task_struct()
> task_numa_free()
> spin_lock(&grp->lock);
>
> Which nests the grp->lock inside the timer->it_lock, and where the
> timer->it_lock is IRQ-safe, the grp->lock is not.
>
> This allows for IRQ deadlocks.

Ah crap. I did a search on all the callers of put_task_struct(), and
somehow missed this one. Yep, I was looking for places that called
this while holding other irq safe locks.

-- Steve

--
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/