netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netpoll: don't send packets to detached device
@ 2006-10-18 20:50 Stephen Hemminger
  2006-10-18 20:55 ` [PATCH] netpoll: netpoll_send_skb local optimization Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2006-10-18 20:50 UTC (permalink / raw)
  To: David S. Miller, Jeff Garzik; +Cc: Linus Torvalds, netdev

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;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-18 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18 20:50 [PATCH] netpoll: don't send packets to detached device Stephen Hemminger
2006-10-18 20:55 ` [PATCH] netpoll: netpoll_send_skb local optimization Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).