Skip to content

Commit

Permalink
netpoll: Use correct primitives for RCU dereferencing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 16, 2010
1 parent 9f70b0f commit d5f31fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/netpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -82,7 +82,7 @@ static inline bool netpoll_rx(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);
}
Expand Down

0 comments on commit d5f31fb

Please sign in to comment.