mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
datapath: 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. Acked-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
This commit is contained in:
@@ -1891,10 +1891,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,
|
reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq,
|
||||||
OVS_VPORT_CMD_NEW);
|
OVS_VPORT_CMD_NEW);
|
||||||
if (IS_ERR(reply)) {
|
if (IS_ERR(reply)) {
|
||||||
err = PTR_ERR(reply);
|
|
||||||
netlink_set_err(GENL_SOCK(sock_net(skb->sk)), 0,
|
netlink_set_err(GENL_SOCK(sock_net(skb->sk)), 0,
|
||||||
ovs_dp_vport_multicast_group.id, err);
|
ovs_dp_vport_multicast_group.id, PTR_ERR(reply));
|
||||||
return 0;
|
goto exit_unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
genl_notify(reply, genl_info_net(info), info->snd_pid,
|
genl_notify(reply, genl_info_net(info), info->snd_pid,
|
||||||
|
Reference in New Issue
Block a user