From: Stephen Hemminger <shemminger@osdl.org>
To: "David S. Miller" <davem@davemloft.net>, Jeff Garzik <jgarzik@pobox.com>
Cc: Linus Torvalds <torvalds@osdl.org>, netdev@vger.kernel.org
Subject: [PATCH] netpoll: don't send packets to detached device
Date: Wed, 18 Oct 2006 13:50:33 -0700 [thread overview]
Message-ID: <20061018135033.4a4872b8@freekitty> (raw)
Netpoll shouldn't send packets to devices that have detached themselves.
This can happen during shutdown or suspend.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- a/net/core/netpoll.c 2006-10-18 13:41:49.000000000 -0700
+++ b/net/core/netpoll.c 2006-10-18 13:43:44.000000000 -0700
@@ -273,7 +273,7 @@
int status;
struct netpoll_info *npinfo;
- if (!np || !np->dev || !netif_running(np->dev)) {
+ if (!np || !np->dev || !netif_device_present(np->dev) || !netif_running(np->dev)) {
__kfree_skb(skb);
return;
}
next reply other threads:[~2006-10-18 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 20:50 Stephen Hemminger [this message]
2006-10-18 20:55 ` [PATCH] netpoll: netpoll_send_skb local optimization Stephen Hemminger
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=20061018135033.4a4872b8@freekitty \
--to=shemminger@osdl.org \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=torvalds@osdl.org \
/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