Subject: Re: [PATCH] Prevent netpoll hanging when link is down

From: Matt Mackall <[email-masked]>
Date: Fri, 8 Oct 2004 16:53:03 -0500

On Fri, Oct 08, 2004 at 08:46:40AM +0200, Colin Leroy wrote:
> On 08 Oct 2004 at 01h10, Andi Kleen wrote:
> 
> Hi, 
> 
> > > Deadlocks from recursion, presumably? We could probably throw in a
> > > max retry count, as ugly as that is..
> > 
> > There should not be any recursion, no.
> 
> If printk() is synchronous, there could be, if there's a printk() in the
> codepath taken by dev->hard_start_xmit()... But I don't if it is...

Have you looked at the code path that does carrier detect for possibly
recursing printks?

> > For most network drivers this shouldn't occur though because
> > the net driver private lock is usually always taken with interrupts
> > off. 
> 
> Second newbie question: how are the interrupts disabled, is it via
> local_irq_save()/local_irq_restore()? or is it something else ?

Often by virtue of being in an interrupt context already.

-- 
Mathematics is the supreme nostalgia of our time.