Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2457010pxb; Tue, 9 Mar 2021 03:04:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeQzA1o0zb6venmMZ87yStQJJysNy9wAK9x5voqCzav5TO0LONYHE7/urD+tYV0oimyMug X-Received: by 2002:a05:6402:10c8:: with SMTP id p8mr3324087edu.144.1615287872186; Tue, 09 Mar 2021 03:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615287872; cv=none; d=google.com; s=arc-20160816; b=C2H7fxjgZqBGWqOwtup1ZwGL57XdYO7APWXTuFAwc4Avzq2e6baGU88J5yD2fj2RUj 4VWNdK+UNUv8WmTCcMZqszwrQsBTKOgu9EJbMlIdr2G2xF8+3P6Z6INtSDwAau8SF6ZC L1Rnk9do0lpxRLHGx793a/u/3PCbPGx78lu06O1kHOzyH8uRwJQL4AeMLg9asYNkatUS 9nuQXTc1yc+UsqOclFAMLzTd85SG1o5G9Y9m5iOSQ9d3nviGw/orTm9aVw8TCkaeKDdW IQNredUVRY07Uog+uuVGtcPRL/R0EmH9Cxv16zGrnJu0jGpZNSqKl/Uil0GKyjzt3KI2 phVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fb6OcTnD9+PhEbIOaZraV4l0BTvIubjtPY0OdONXfDc=; b=cHgRiSSjOsLvo+hWYOg2G5HgVG81l8xY4B0qyn4W9QhhzksMowybgy80vNCIZwcpZc /AfUkh6AdM8PoYusV3s05wDNoaoNUjIV8bVqciyHbaD2MkYRHiN3ta3tmyF6zoTTh4wi w21DHaPbnYnPuL+jT5FIXi/lXqwDpeDGWsy6QxI98cJMTGYoH7lnIarhq3HX1TVYEuYx cDdQT2XTFCmpc33fSo0syOk8PSkymb99RKPlsiArN/H7RnfRxIjVvwCITO5kbrPKEew+ EtYylo/B0unE5N89/SXhIu9pibhw/vp91JgUKQkRgDkdU5PO96KHqI/1r200AdP5lg3x vSBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si2105024edy.452.2021.03.09.03.04.09; Tue, 09 Mar 2021 03:04:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230122AbhCILCB (ORCPT + 99 others); Tue, 9 Mar 2021 06:02:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbhCILBp (ORCPT ); Tue, 9 Mar 2021 06:01:45 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8176C06174A; Tue, 9 Mar 2021 03:01:44 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1lJa77-0005Oy-1Q; Tue, 09 Mar 2021 12:01:21 +0100 Date: Tue, 9 Mar 2021 12:01:21 +0100 From: Florian Westphal To: Jia-Ju Bai Cc: pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de, roopa@nvidia.com, nikolay@nvidia.com, davem@davemloft.net, kuba@kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: bridge: fix error return code of do_update_counters() Message-ID: <20210309110121.GD10808@breakpoint.cc> References: <20210309022854.17904-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210309022854.17904-1-baijiaju1990@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jia-Ju Bai wrote: > When find_table_lock() returns NULL to t, no error return code of > do_update_counters() is assigned. Its -ENOENT. > t = find_table_lock(net, name, &ret, &ebt_mutex); ^^^^^ ret is passed to find_table_lock, which passes it to find_inlist_lock_noload() which will set *ret = -ENOENT for NULL case.