Skip to contentSkip to conversation

netpoll: add RCU annotation to npinfo field

PATCH Applied Cong Wang 2 participants 2 messages Jan 23, 2013 – Jan 28, 2013

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 netpoll: add RCU annotation to npinfo field

From: Cong Wang <[email protected]>

dev->npinfo is protected by RCU.

This fixes the following sparse warnings:

net/core/netpoll.c:177:48: error: incompatible types in comparison expression (different address spaces) net/core/netpoll.c:200:35: error: incompatible types in comparison expression (different address spaces) net/core/netpoll.c:221:35: error: incompatible types in comparison expression (different address spaces) net/core/netpoll.c:327:18: error: incompatible types in comparison expression (different address spaces)

Cc Eric Dumazet <[email protected]>
Cc David S. Miller <[email protected]>

---

include/linux/netdevice.h +1 -1
index 549f5ad..85b0949 100644
@@ -1272,7 +1272,7 @@ struct net_device {
 	void (*destructor)(struct net_device *dev);
 
 #ifdef CONFIG_NETPOLL
-	struct netpoll_info	*npinfo;
+	struct netpoll_info __rcu	*npinfo;
 #endif
 
 #ifdef CONFIG_NET_NS
maintainer Applied
#1 lore raw

From: Cong Wang <[email protected]>
Date: Wed, 23 Jan 2013 15:29:39 +0800

Quoted 6 lines

From: Cong Wang <[email protected]>

dev->npinfo is protected by RCU.

This fixes the following sparse warnings:

Quoted 8 lines

net/core/netpoll.c:177:48: error: incompatible types in comparison expression (different address spaces) net/core/netpoll.c:200:35: error: incompatible types in comparison expression (different address spaces) net/core/netpoll.c:221:35: error: incompatible types in comparison expression (different address spaces) net/core/netpoll.c:327:18: error: incompatible types in comparison expression (different address spaces)

Cc Eric Dumazet <[email protected]>
Cc David S. Miller <[email protected]>

Applied.