Skip to content

Commit

Permalink
openvswitch: Release rtnl_lock if ovs_vport_cmd_build_info() failed.
Browse files Browse the repository at this point in the history
This patch fixes a possible lock-up bug where rtnl_lock might not
get released.

Signed-off-by: Ansis Atteka <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
  • Loading branch information
Ansis Atteka authored and jessegross committed May 4, 2012
1 parent bf32fec commit 4cb6e11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,10 +1641,9 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)
reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq,
OVS_VPORT_CMD_NEW);
if (IS_ERR(reply)) {
err = PTR_ERR(reply);
netlink_set_err(init_net.genl_sock, 0,
ovs_dp_vport_multicast_group.id, err);
return 0;
ovs_dp_vport_multicast_group.id, PTR_ERR(reply));
goto exit_unlock;
}

genl_notify(reply, genl_info_net(info), info->snd_pid,
Expand Down

0 comments on commit 4cb6e11

Please sign in to comment.