From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756428AbeARNtO (ORCPT ); Thu, 18 Jan 2018 08:49:14 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39826 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756408AbeARNtM (ORCPT ); Thu, 18 Jan 2018 08:49:12 -0500 X-Google-Smtp-Source: ACJfBovlWFqTnL5WFMXt0zKtyv9EZKQleMrJL7cDGplVKI6wuZswRf1+nu6HIchqegBQYgercW7CCg== Date: Thu, 18 Jan 2018 14:49:10 +0100 From: Jiri Pirko To: Arnd Bergmann Cc: Jamal Hadi Salim , Cong Wang , "David S. Miller" , David Ahern , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [net-next] net: sched: avoid uninitialized variable use Message-ID: <20180118134910.GA2063@nanopsycho.orion> References: <20180118131747.920324-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118131747.920324-1-arnd@arndb.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Jan 18, 2018 at 02:17:28PM CET, arnd@arndb.de wrote: >gcc has identified a code path in which we pass uninitialized >data into tc_dump_tfilter(): > >net/sched/cls_api.c: In function 'tc_dump_tfilter': >net/sched/cls_api.c:1268:8: error: 'parent' may be used uninitialized in this function [-Werror=maybe-uninitialized] > >This initializes the variable to the value it had before the previous >change. > >Fixes: 7960d1daf278 ("net: sched: use block index as a handle instead of qdisc when block is shared") >Signed-off-by: Arnd Bergmann >---- >I don't know if my patch is the best way to address the issue, but >if not, then at least it helps show what the warning is about >and lets someone else come up with a better solution. I already sent a fix for this: http://patchwork.ozlabs.org/patch/862787/