dev =dev_get_by_index_rcu(net, ifindex);if(dev) in_dev = rcu_dereference_rtnl(dev->ip_ptr); rcu_read_unlock();returnin_dev; } 开发者ID:membry,项目名称:linux-2.6,代码行数:15,代码来源:devinet.c 示例10: nf_flow_offload_ipv6_hook ▲点赞 1▼ unsignedintnf_flow_offload_ipv6_hook...
Annotate it with rcu_dereference_rtnl() instead, and remove the inner RCU critical section. Fixes: 4cb4f97 ("bonding: rebuild the lock use for bond_mii_monitor()") Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Jay Vosburgh...
part = rcu_dereference(ptbl->last_lookup);if(part && sector_in_part(part, sector))returnpart;for(i =1; i < ptbl->len; i++) { part = rcu_dereference(ptbl->part[i]);if(part && sector_in_part(part, sector)) {rcu_assign_pointer(ptbl->last_lookup, part);returnpart; } }retu...
slave = rcu_dereference(bond->curr_active_slave); if (slave && slave_can_tx(slave)) bond_dev_queue_xmit(bond, skb, slave->dev); else @@ -3870,7 +3872,7 @@ static int bond_xmit_activebackup(struct sk_buff *skb, struct net_device *bond_d struct bonding *bond = netdev_priv(bon...
aca = rtnl_dereference(aca->aca_next)) { if (ipv6_addr_equal(&aca->aca_addr, addr)) break; prev_aca = aca; @@ -364,9 +366,9 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr) return 0; ...
/* holding rtnl */staticvoidvrf_rtable_release(struct net_device *dev, struct net_vrf *vrf){structrtable*rth=rtnl_dereference(vrf->rth);structrtable*rth_local=rtnl_dereference(vrf->rth_local);structnet*net=dev_net(dev);structdst_entry*dst;RCU_INIT_POINTER(vrf->rth,NULL);RCU_INIT_POINTE...
peer=rcu_dereference(priv->peer); iflink=peer?peer->ifindex:0; iflink=peer?READ_ONCE(peer->ifindex):0; rcu_read_unlock(); returniflink; 2 changes: 1 addition & 1 deletion2drivers/net/wireless/virtual/virt_wifi.c { structvirt_wifi_netdev_priv*priv=netdev_priv(dev); ...
stats = rcu_dereference(flow->stats[node]);/* Check if already have node-specific stats. */if(likely(stats)) { spin_lock(&stats->lock);/* Mark if we write on the pre-allocated stats. */if(node ==0&& unlikely(flow->stats_last_writer != node)) ...