mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
9f70b0fcec
commit
d5f31fbfd8
1 file changed
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user