skb->protocol = htons(ETH_P_802_2);
flow_extract(skb, execute->in_port, &key);
+
+ rcu_read_lock();
err = execute_actions(dp, skb, &key, actions->actions,
actions->n_actions, GFP_KERNEL);
+ rcu_read_unlock();
+
kfree(actions);
return err;
goto out;
}
- if (vport->ops->get_stats)
+ if (vport->ops->get_stats) {
+ rcu_read_lock();
err = vport->ops->get_stats(vport, &stats_req.stats);
- else if (vport->ops->flags & VPORT_F_GEN_STATS) {
+ rcu_read_unlock();
+
+ } else if (vport->ops->flags & VPORT_F_GEN_STATS) {
int i;
memset(&stats_req.stats, 0, sizeof(struct odp_vport_stats));
goto out;
}
+ rcu_read_lock();
memcpy(vport_ether.ether_addr, vport_get_addr(vport), ETH_ALEN);
+ rcu_read_unlock();
out:
vport_unlock();
dump_stack();
}
+ rcu_read_lock();
+
hlist_for_each_entry(vport, node, bucket, hash_node)
if (!strcmp(name, vport_get_name(vport)))
- return vport;
+ goto out;
- return NULL;
+ vport = NULL;
+
+out:
+ rcu_read_unlock();
+ return vport;
}
static void