[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070821230851.GP32236@postel.suug.ch>
Date: Wed, 22 Aug 2007 01:08:51 +0200
From: Thomas Graf <tgraf@...g.ch>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org
Subject: [NET]: Don't do netpoll on per cpu backlog napi struct
The per cpu backlog napi struct can't do netpoll and has the
dev member set to NULL. Fixes an oops on boot when netpoll is
enabled.
Signed-off-by: Thomas Graf <tgraf@...g.ch>
Index: net-2.6.24/include/linux/netpoll.h
===================================================================
--- net-2.6.24.orig/include/linux/netpoll.h 2007-08-22 01:02:14.000000000 +0200
+++ net-2.6.24/include/linux/netpoll.h 2007-08-22 01:02:30.000000000 +0200
@@ -75,7 +75,7 @@ static inline void *netpoll_poll_lock(st
struct net_device *dev = napi->dev;
rcu_read_lock(); /* deal with race on ->npinfo */
- if (dev->npinfo) {
+ if (dev && dev->npinfo) {
spin_lock(&napi->poll_lock);
napi->poll_owner = smp_processor_id();
return napi;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists