From: David Miller <davem@davemloft.net>
To: vegard.nossum@gmail.com
Cc: adobriyan@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [RFC][PATCH] netconsole: avoid deadlock on printk from driver code
Date: Wed, 13 Aug 2008 03:56:28 -0700 (PDT) [thread overview]
Message-ID: <20080813.035628.169565636.davem@davemloft.net> (raw)
In-Reply-To: <19f34abd0808130344h65e793eare83c0f41cb1cfb8a@mail.gmail.com>
From: "Vegard Nossum" <vegard.nossum@gmail.com>
Date: Wed, 13 Aug 2008 12:44:46 +0200
> There must also be no BUG()s, WARN()s, other debugging facilities
> (spinlock debugging, lockdep, irqtrace, etc.) triggering which may
> call printk() inside the protected section. Can we really ensure this?
> For all drivers supporting netconsole?
For all drivers supporting netconsole? Well yes, there will be some
bugs somewhere in some driver wrt. netconsole. But that's life
and why we will constantly have something to fix in the kernel isn't
it?
But one thing is for sure, your deliriously dirty ->busy thing is
emphatically not the answer.
BTW, it seems the main reason this driver is susceptible to this
problem is that it doesn't handle link status events in it's
NAPI poll handler. If it did that, you would have never seen
this deadlock.
The netpoll layer prevents recursion into the NAPI ->poll() handler.
Most drivers manage link state either in their NAPI ->poll() handler
or a periodic timer that samples the link state. Both schemes
avoid this very issue.
next prev parent reply other threads:[~2008-08-13 10:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 9:53 Vegard Nossum
2008-08-13 9:59 ` Alexey Dobriyan
2008-08-13 10:21 ` Vegard Nossum
2008-08-13 10:29 ` David Miller
2008-08-13 10:44 ` Vegard Nossum
2008-08-13 10:56 ` David Miller [this message]
2008-08-13 10:37 ` David Miller
2008-08-14 13:28 ` Pekka Enberg
2008-08-14 13:44 ` Pekka J Enberg
2008-08-14 22:15 ` David Miller
2008-08-20 17:54 ` Pekka J Enberg
2008-08-20 19:56 ` Vegard Nossum
2008-08-20 20:58 ` David Miller
2008-08-14 22:13 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080813.035628.169565636.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=adobriyan@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vegard.nossum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®