Skip to contentSkip to conversation

: Don't do netpoll on per cpu backlog napi struct

NET Applied Thomas Graf 2 participants 2 messages Aug 21, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

include/linux/netpoll.h +1 -1
Index: net-2.6.24/include/linux/netpoll.h
===================================================================
@@ -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;
maintainer Applied
#1 lore raw

From: Thomas Graf <[email protected]>
Date: Wed, 22 Aug 2007 01:08:51 +0200

Quoted 5 lines

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.

Applied, thanks a lot Thomas.