]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 11 Sep 2017 19:56:20 +0000 (21:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:56:02 +0000 (11:56 +0200)
[ 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 <christophe.jaillet@wanadoo.fr>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/openvswitch/datapath.c

index 6b44fe4052825a87b373bafb58ca014e3ec99015..294444bb075c8b88dd3807a0a659be17a43863c4 100644 (file)
@@ -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,