From: Christophe JAILLET Date: Mon, 11 Sep 2017 19:56:20 +0000 (+0200) Subject: openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()' X-Git-Tag: v4.13.6~156 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ff70afba46961d071c0f6bdfdffe745870d01ba4;p=users%2Fdwmw2%2Flinux.git openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()' [ Upstream commit 5829e62ac17a40ab08c1b905565604a4b5fa7af6 ] All other error handling paths in this function go through the 'error' label. This one should do the same. Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.") Signed-off-by: Christophe JAILLET Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 6b44fe4052825..294444bb075c8 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1126,7 +1126,8 @@ static int ovs_nla_init_match_and_action(struct net *net, if (!a[OVS_FLOW_ATTR_KEY]) { OVS_NLERR(log, "Flow key attribute not present in set flow."); - return -EINVAL; + error = -EINVAL; + goto error; } *acts = get_flow_actions(net, a[OVS_FLOW_ATTR_ACTIONS], key,