mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix netpoll cleanup on abort without dev
@ 2004-08-04 14:20 Matt Mackall
  2004-08-04 14:54 ` Jeff Moyer
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Mackall @ 2004-08-04 14:20 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton

If netpoll attempts to use a device without polling support, it will
oops when shutting down. This adds a check that we've actually
attached to a device.

Signed-off-by: Matt Mackall <mpm@selenic.com>

Index: np/net/core/netpoll.c
===================================================================
--- np.orig/net/core/netpoll.c	2004-08-04 08:50:56.000000000 -0500
+++ np/net/core/netpoll.c	2004-08-04 09:02:50.000000000 -0500
@@ -614,7 +614,8 @@
 		spin_lock_irqsave(&rx_list_lock, flags);
 		list_del(&np->rx_list);
 #ifdef CONFIG_NETPOLL_RX
-		np->dev->netpoll_rx = 0;
+		if (np->dev)
+			np->dev->netpoll_rx = 0;
 #endif
 		spin_unlock_irqrestore(&rx_list_lock, flags);
 	}


-- 
Mathematics is the supreme nostalgia of our time.

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

end of thread, other threads:[~2004-08-04 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-04 14:20 [PATCH] Fix netpoll cleanup on abort without dev Matt Mackall
2004-08-04 14:54 ` Jeff Moyer
2004-08-04 15:11   ` Matt Mackall

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®