aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netpoll.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-06-16 00:44:29 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-16 00:44:29 -0400
commitd5f31fbfd8fa3836a918592032853c41d1797c3d (patch)
treeb5b2e10650d93e3e7c86a8caa1f9ee55fa6ff83f /include/linux/netpoll.h
parent9f70b0fcecd134890affe627aa2823591313a413 (diff)
netpoll: Use correct primitives for RCU dereferencing
Now that RCU debugging checks for matching rcu_dereference calls and rcu_read_lock, we need to use the correct primitives or face nasty warnings. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r--include/linux/netpoll.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 4c77fe78ceff..413742c92d14 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -64,7 +64,7 @@ static inline bool netpoll_rx(struct sk_buff *skb)
64 bool ret = false; 64 bool ret = false;
65 65
66 rcu_read_lock_bh(); 66 rcu_read_lock_bh();
67 npinfo = rcu_dereference(skb->dev->npinfo); 67 npinfo = rcu_dereference_bh(skb->dev->npinfo);
68 68
69 if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) 69 if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
70 goto out; 70 goto out;
@@ -82,7 +82,7 @@ out:
82 82
83static inline int netpoll_rx_on(struct sk_buff *skb) 83static inline int netpoll_rx_on(struct sk_buff *skb)
84{ 84{
85 struct netpoll_info *npinfo = rcu_dereference(skb->dev->npinfo); 85 struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo);
86 86
87 return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); 87 return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags);
88} 88}