Commit d5f31fbf authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f70b0fc
...@@ -64,7 +64,7 @@ static inline bool netpoll_rx(struct sk_buff *skb) ...@@ -64,7 +64,7 @@ static inline bool netpoll_rx(struct sk_buff *skb)
bool ret = false; bool ret = false;
rcu_read_lock_bh(); 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)) if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
goto out; goto out;
...@@ -82,7 +82,7 @@ static inline bool netpoll_rx(struct sk_buff *skb) ...@@ -82,7 +82,7 @@ static inline bool netpoll_rx(struct sk_buff *skb)
static inline int netpoll_rx_on(struct sk_buff *skb) 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); return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment