lkml.org 
[lkml]   [2004]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix netpoll cleanup on abort without dev
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.
-
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:04    [from the cache]
©2003-2011 Jasper Spaans