Skip to content

Commit 4cb6e11

Browse files
Ansis Attekajessegross
authored andcommitted
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>
1 parent bf32fec commit 4cb6e11

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎net/openvswitch/datapath.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,10 +1641,9 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)
16411641
reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq,
16421642
OVS_VPORT_CMD_NEW);
16431643
if (IS_ERR(reply)) {
1644-
err = PTR_ERR(reply);
16451644
netlink_set_err(init_net.genl_sock, 0,
1646-
ovs_dp_vport_multicast_group.id, err);
1647-
return 0;
1645+
ovs_dp_vport_multicast_group.id, PTR_ERR(reply));
1646+
goto exit_unlock;
16481647
}
16491648

16501649
genl_notify(reply, genl_info_net(info), info->snd_pid,

0 commit comments

Comments
 (0)