goto err_put_module;
INIT_LIST_HEAD(&dp->port_list);
mutex_init(&dp->mutex);
+ mutex_lock(&dp->mutex);
dp->dp_idx = dp_idx;
for (i = 0; i < DP_N_QUEUES; i++)
skb_queue_head_init(&dp->queues[i]);
rcu_assign_pointer(dps[dp_idx], dp);
dp_sysfs_add_dp(dp);
+ mutex_unlock(&dp->mutex);
mutex_unlock(&dp_mutex);
rtnl_unlock();
err_destroy_table:
tbl_destroy(get_table_protected(dp), NULL);
err_free_dp:
+ mutex_unlock(&dp->mutex);
kfree(dp);
err_put_module:
module_put(THIS_MODULE);
return err;
}
-/* Called with RTNL lock and dp_mutex. */
+/* Called with RTNL lock and dp->mutex. */
static int new_vport(struct datapath *dp, struct odp_port *odp_port, int port_no)
{
struct vport_parms parms;