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 <[EMAIL PROTECTED]>

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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to