From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B917C4361A for ; Fri, 4 Dec 2020 12:09:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27D87225A9 for ; Fri, 4 Dec 2020 12:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729196AbgLDMJY (ORCPT ); Fri, 4 Dec 2020 07:09:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55184 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728306AbgLDMJX (ORCPT ); Fri, 4 Dec 2020 07:09:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607083677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YSihSOsWFmLzIa7KPfAOw3HjE0N1/4AahcgnwcmoJog=; b=Nu+lutG9JLRLOyTY3As+oYFoV48OF3us6EWFWhnTlcFphhSB8E3ggJkyORCb7XK1zw5zpm SZyfADkhqqBbW469WPTRVXO4wvLGJP5J18YQfgaz2M3VN2aNbF1OCZYOC9qW+L0VFUBQyw w3nRkD5D/yHowap/53/zvuiL9cQJ75I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-497-GNRffqxnO026qXfrPzNb7A-1; Fri, 04 Dec 2020 07:07:53 -0500 X-MC-Unique: GNRffqxnO026qXfrPzNb7A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43FC6190B2A2; Fri, 4 Dec 2020 12:07:52 +0000 (UTC) Received: from [10.36.112.238] (ovpn-112-238.ams2.redhat.com [10.36.112.238]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6A8027C55; Fri, 4 Dec 2020 12:07:50 +0000 (UTC) From: "Eelco Chaudron" To: "Wang Hai" Cc: pshelar@ovn.org, davem@davemloft.net, kuba@kernel.org, dev@openvswitch.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] openvswitch: fix error return code in validate_and_copy_dec_ttl() Date: Fri, 04 Dec 2020 13:07:48 +0100 Message-ID: <40A832BA-4065-4FB2-9C33-D41CF4B336CF@redhat.com> In-Reply-To: <20201204114314.1596-1-wanghai38@huawei.com> References: <20201204114314.1596-1-wanghai38@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4 Dec 2020, at 12:43, Wang Hai wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Changing 'return start' to 'return action_start' can fix this bug. > > Fixes: 69929d4c49e1 ("net: openvswitch: fix TTL decrement action > netlink message format") > Reported-by: Hulk Robot > Signed-off-by: Wang Hai Thanks for fixing! Reviewed-by: Eelco Chaudron > --- > net/openvswitch/flow_netlink.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswitch/flow_netlink.c > b/net/openvswitch/flow_netlink.c > index ec0689ddc635..4c5c2331e764 100644 > --- a/net/openvswitch/flow_netlink.c > +++ b/net/openvswitch/flow_netlink.c > @@ -2531,7 +2531,7 @@ static int validate_and_copy_dec_ttl(struct net > *net, > > action_start = add_nested_action_start(sfa, OVS_DEC_TTL_ATTR_ACTION, > log); > if (action_start < 0) > - return start; > + return action_start; > > err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type, > vlan_tci, mpls_label_count, log); > -- > 2.17.1