From: Ansis Atteka Date: Thu, 3 May 2012 20:48:40 +0000 (-0700) Subject: datapath: Release rtnl_lock if ovs_vport_cmd_build_info() failed X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a6c067d1ad65ae4abdb723b25a4ab591d1d2bc3;p=openvswitch 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 Signed-off-by: Ansis Atteka --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 079b3f20..63713d87 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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, OVS_VPORT_CMD_NEW); if (IS_ERR(reply)) { - err = PTR_ERR(reply); netlink_set_err(GENL_SOCK(sock_net(skb->sk)), 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,