Received: by 10.223.176.5 with SMTP id f5csp2623819wra; Thu, 1 Feb 2018 03:29:43 -0800 (PST) X-Google-Smtp-Source: AH8x226idrHo+Ssx/zcrQDHdI7X8cJIQBOOoPACCYO+l/FPTw7OOHyTDMzvfCJzZXreRpVdxd33u X-Received: by 10.99.173.5 with SMTP id g5mr29016802pgf.391.1517484583331; Thu, 01 Feb 2018 03:29:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517484583; cv=none; d=google.com; s=arc-20160816; b=yHA8XCApgEqXMR7XqxTid+73I0EABFHJttfiXaxn3oc9bqIRi7qRyEeRQMjiNm26eF TIY11HpMNdiMQOJfDhtR6b4Q0x1MsiZkxeKPYuXagb0j2iHmXNoIQ85YPUs0Y2FJm8WY kT+HmO+6z6TymIN7PsHxMXPAZDtbhoEpCXAfLWBsoLlCqr6yU+tkBUDjL0f0cDclrseK FPyGyltvu27m93g3HQ+VHI0+z9zYlKXMwZTJQCVPaKuS6vEOJTjFgAMGon6UZLV2PY58 QFp183bAhlLnRVI3G0F4mdzL5hYvBGHLBew7HUOqnNdAoxzrJoNuymlpNa24/2mtlcT6 3hKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=8kSV/6xrwwjNSFQrCuVyTCNIgWF9ceUqx7m70tscaqM=; b=BfcyXe/rY+lfqnBCFSPCEg2RD3EBV2Alro4CcTkrkm1jd4lYdNfITt5QMvOUS8fhgH wVm7VkDxMplIukzih15JQ6mtYsyJqDkVM2LuHW+AXKoDrGJlWQQPviWTveiINoOW5q6c zISvZFKIP98zgoMwCcIWdEWw03O5g4AvUyfhJZcf5J+YT5a2VFrWC9NkCEUkYVTjq5Gg 0g/ct2eKcv9y496HZWL67zKduBcNJKRimWKSN4CNCLNzMRsG8BSdOgXwL5A1a+/wj0bE YWzVf6qWv02RzGtTztf8RII80K8sIjLlZY7vRAJWEQQXE/SzIc0/LOGq5t6YGYa1bgsQ wFLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=N+Z0Cjc9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si1308093pgq.28.2018.02.01.03.29.27; Thu, 01 Feb 2018 03:29:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=N+Z0Cjc9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbeBAL3G (ORCPT + 99 others); Thu, 1 Feb 2018 06:29:06 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54382 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbeBAL3C (ORCPT ); Thu, 1 Feb 2018 06:29:02 -0500 Received: by mail-wm0-f66.google.com with SMTP id i186so5128102wmi.4 for ; Thu, 01 Feb 2018 03:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8kSV/6xrwwjNSFQrCuVyTCNIgWF9ceUqx7m70tscaqM=; b=N+Z0Cjc9gUdM2cs3ow1hGmctJ+mjJx80LS7su+yFJSW9FK92Z4eeXQMOyF2/UhYMxY jiSXoQjat4A5fI5iQIceI656Hmk6dQ605tPhXMZpiQHBeM8cVtUKXkL8s8p9seuqDfcJ g2GDJCowBnEvY5TgvBGmRg6Rodn7eBYwnFktA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8kSV/6xrwwjNSFQrCuVyTCNIgWF9ceUqx7m70tscaqM=; b=C+1qSTBcmPayPuCSsgP7999MKoG+GsSGARPcMj6A5HVrUcBFADqaAWcCv6FbDZ/WMF 1xCuYmbmGhqiAXY2DwJCimyxcnC1hm2+7hQZICduBU5ETNu9RHPPYIb4Ulx6NWUJzVbm Of7ActEteCCluBtSrn601vqeHcRGR5wkaM2bFyBSGuXOX8/j1X4d3YakziOTINbtDlVQ A5eWWDvAiBG3QTVht696cIzqzyMlTrZMuT1a3GGU2vJ/wygyytMBe47B7mmgsHcIy3KP TNVmiXXLKLUNvnGa35K1x9+mFZtB53JoUO6fGji7xuU2MZom4yT4BqBcuLyia6PLQFz0 +Cgw== X-Gm-Message-State: AKwxyteq1xyn0NqbDNgKHyWFbJlJ1Gq1s0I6pB/x+N1C47JBL961RSYH rVcrI6Z7amkpvooWokN7Rbdh6pAL X-Received: by 10.28.156.81 with SMTP id f78mr24898360wme.131.1517484540947; Thu, 01 Feb 2018 03:29:00 -0800 (PST) Received: from [192.168.0.103] (46-10-142-144.ip.btc-net.bg. [46.10.142.144]) by smtp.googlemail.com with ESMTPSA id d17sm16870353wrc.19.2018.02.01.03.28.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 03:29:00 -0800 (PST) Subject: Re: [PATCH] net: bridge: Fix uninitialized error in br_fdb_sync_static() To: Geert Uytterhoeven , "David S . Miller" , Stephen Hemminger Cc: Arnd Bergmann , bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1517480728-5580-1-git-send-email-geert@linux-m68k.org> From: Nikolay Aleksandrov Message-ID: <657a050a-444d-2ad3-17fb-e855f5c54ea9@cumulusnetworks.com> Date: Thu, 1 Feb 2018 13:28:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1517480728-5580-1-git-send-email-geert@linux-m68k.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/02/18 12:25, Geert Uytterhoeven wrote: > With gcc-4.1.2.: > > net/bridge/br_fdb.c: In function ‘br_fdb_sync_static’: > net/bridge/br_fdb.c:996: warning: ‘err’ may be used uninitialized in this function > > Indeed, if the list is empty, err will be uninitialized, and will be > propagated up as the function return value. > > Fix this by preinitializing err to zero. > > Fixes: eb7935830d00b9e0 ("net: bridge: use rhashtable for fdbs") > Signed-off-by: Geert Uytterhoeven > --- > net/bridge/br_fdb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c > index dc87fbc9a23b04e6..d9e69e4514beb20d 100644 > --- a/net/bridge/br_fdb.c > +++ b/net/bridge/br_fdb.c > @@ -993,7 +993,7 @@ int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[], > int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p) > { > struct net_bridge_fdb_entry *f, *tmp; > - int err; > + int err = 0; > > ASSERT_RTNL(); > > Thanks, Acked-by: Nikolay Aleksandrov