From patchwork Mon Dec 11 21:50:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 847245 X-Patchwork-Delegate: jpettit@nicira.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UoA5yoxo"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ywc9J5686z9sxR for ; Tue, 12 Dec 2017 08:51:32 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0E625D6C; Mon, 11 Dec 2017 21:50:59 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D92C4D62 for ; Mon, 11 Dec 2017 21:50:57 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7012E4FF for ; Mon, 11 Dec 2017 21:50:57 +0000 (UTC) Received: by mail-pg0-f46.google.com with SMTP id b11so11874346pgu.13 for ; Mon, 11 Dec 2017 13:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/Sg+92lJcLhFphPXeiMpZ04uha4XABF7n8tJa8BBxCc=; b=UoA5yoxom8jDzsNFCHnc4H8HqPQXwE1BvvGNxEALaw0FFMEH7bxzEblYksX9GToSWN kAtRls/3pEQcn1nrXXoVSXyh2IAbkWE8QHmswF+7P0L5HxnI6hjKlBP1a+WrIL8voUvs pLEDDT58BdZpBfmTLnIupR+X6RMBTzAxJoPrnm6r88lI31FlA8+EMo1//XE4jeqNVOru FDuAMkjyz90X5MnLQR5CH7f7ZpwIsVAf95EsT6s2o40Hpxs2OqLwl/aoCGQnCxnEviAi xXVKp1fwOHNavmyCQrfM50JaXxuw8+f0AwCgeLxN2rvJKNt7vbphSlsqzYdWFusYe+uk vMoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/Sg+92lJcLhFphPXeiMpZ04uha4XABF7n8tJa8BBxCc=; b=ksXSTecxO2PbYo2C9/uJuBf7Efceh3Ue4N20cfGBwM90hN1cRQEv6miP13fcBkPUOH aTNv4PkQ6Efol0jPRS5eqFWoSAiqwMRlct+RXVJ00rGii6GIxMQcBaCYjkJ7sFaoSePh NLn4VJHVqlIA9tCUkGoa7rhVNDjes5G6mzeAgl24fWxjb1zE4l4TjYbIxGDxltW+PmR/ kYLnCt1iVJJ/icaW6CyrFRb7pHc2u2n0qq59ofuvYisnYv3VuYwaTzyMzhjjJQlf4zU8 rtsSC+Q5tKbUfgoFJQOFoB47avRWFNvzud9WS0sfftk84QjJIPuWGE6USWdAGx49B0eJ BYkA== X-Gm-Message-State: AKGB3mK8e1/ECGTcKHwu7FqlqFyZdhS4GClK/sgvVoW1nByvAnoQu0or 4UsJjaVuDQ6kMUArF5kiQBJhWsyL X-Google-Smtp-Source: ACJfBovTmvRj6XTMGvkxW/6F1TAKQaPbW1u+jokWYVCL44zcwHfwcka3bRZs9wiEY5i9CkMUX5aV4w== X-Received: by 10.84.240.70 with SMTP id h6mr1715980plt.349.1513029056660; Mon, 11 Dec 2017 13:50:56 -0800 (PST) Received: from gizo.domain (67-5-143-47.ptld.qwest.net. [67.5.143.47]) by smtp.gmail.com with ESMTPSA id c185sm25572799pfb.48.2017.12.11.13.50.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 13:50:55 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Dec 2017 13:50:22 -0800 Message-Id: <1513029033-9087-2-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513029033-9087-1-git-send-email-gvrose8192@gmail.com> References: <1513029033-9087-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Christophe JAILLET Subject: [ovs-dev] [PATCH 01/12] datapath: Fix an error handling path in 'ovs_nla_init_match_and_action() X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Christophe JAILLET Upstream commit: commit 5829e62ac17a40ab08c1b905565604a4b5fa7af6 Author: Christophe JAILLET Date: Mon Sep 11 21:56:20 2017 +0200 openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()' 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 Cc: Christophe JAILLET Fixes: 850c2a4d1a ("datapath: Avoid using stack larger than 1024.") Signed-off-by: Greg Rose Reviewed-by: Yifeng Sun --- datapath/datapath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 1780819..eeab72a 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1136,7 +1136,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,