netpoll: Use correct primitives for RCU dereferencing
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 16 Jun 2010 04:44:29 +0000 (21:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2010 04:44:29 +0000 (21:44 -0700)
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>
include/linux/netpoll.h

index 4c77fe78ceff34842d0a55806b36819398b7d234..413742c92d14efce0e98743a101a67fb3e8c2f97 100644 (file)
@@ -64,7 +64,7 @@ static inline bool netpoll_rx(struct sk_buff *skb)
        bool ret = false;
 
        rcu_read_lock_bh();
-       npinfo = rcu_dereference(skb->dev->npinfo);
+       npinfo = rcu_dereference_bh(skb->dev->npinfo);
 
        if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
                goto out;
@@ -82,7 +82,7 @@ out:
 
 static inline int netpoll_rx_on(struct sk_buff *skb)
 {
-       struct netpoll_info *npinfo = rcu_dereference(skb->dev->npinfo);
+       struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo);
 
        return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags);
 }