diff options
author | Ansis Atteka <aatteka@nicira.com> | 2012-05-03 18:40:38 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-05-03 18:40:38 -0700 |
commit | 4cb6e116bb97c8b87a1f4f95e99d0c8dda2a6e9b (patch) | |
tree | 071d9dfaa2cb307e0af570ae2455ce8deee9dbce /net | |
parent | bf32fecdc1851ad9ca960f56771b798d17c26cf1 (diff) |
openvswitch: Release rtnl_lock if ovs_vport_cmd_build_info() failed.
This patch fixes a possible lock-up bug where rtnl_lock might not
get released.
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/openvswitch/datapath.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index e44e631ea95..4cb615d4636 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -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, |