lkml.org 
[lkml]   [2004]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: netpoll trapped question
On Tue, Sep 07, 2004 at 01:10:00PM -0400, Jeff Moyer wrote:
> ==> Regarding Re: netpoll trapped question; Matt Mackall <mpm@selenic.com> adds:
>
> mpm> On Tue, Sep 07, 2004 at 12:53:17PM -0400, Jeff Moyer wrote: A random
> mpm> lock private to a given driver, for instance one taken on entry to the
> mpm> IRQ handler. If said driver tries to do a printk inside that lock and
> mpm> we recursively call the handler in netconsole, we're in trouble.
> mpm> These are the issues that will have to be cleaned up in individual
> mpm> drivers. So far, I haven't seen any reports, but I'm pretty sure such
> mpm> cases exist. I suppose it's also possible for us to disable recursion
> mpm> in netconsole instead of at the netpoll level.
> >> Recursion in netconsole is protected by the console semaphore.
>
> mpm> Yes, true. But we're still in trouble if we have nic irq handler ->
> mpm> take private lock -> printk -> netconsole -> nic irq handler -> take
> mpm> private lock. See?
>
> Okay, so that one has to be addressed on a per-driver basis. There's no
> way for us to detect that situation. And how do drivers address this?
> Simply don't printk inside the lock? I think that's reasonable.

That or drop the lock where possible.

--
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.085 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site