Re: Regression: WARNINGS and lockdep spews in 2.6.38-rc3+(bisected).

From: Peter Zijlstra
Date: Tue Feb 08 2011 - 11:54:29 EST


On Thu, 2011-02-03 at 19:42 +0800, Yong Zhang wrote:
> My patch is inspired by this http://lkml.org/lkml/2010/8/16/291

Right, so that splat warns about:

spin_lock_irqsave(&shost->host_lock);
del_timer_sync()
spin_lock_irqsave(&t->split_timeout_timer);

vs

<SOFTIRQ>
call_timer_fn()
spin_lock(&t->split_timeout_timer);
<IRQ>
spin_lock_irqsave(&shost->host_lock);

Which Steven just pointed out is an actual deadlock because:


CPU0 CPU1
spin_lock_irqsave(&shost->host_lock);
<SOFTIRQ>
call_timer_fn();
base->running_timer = timer;
func();
<IRQ>
spin_lock(&shost->host_lock);
del_timer_sync()
while(base->running_timer == timer);

And the world stops turning..


Also note that your patch changes the above to:

spin_lock_irqsave(&shost->host_lock);
del_timer_sync()
spin_lock_bh(&t->split_timeout_timer);

Which wouldn't make one bit of difference.

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