From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965AbcH2EbC (ORCPT ); Mon, 29 Aug 2016 00:31:02 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:49432 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbcH2EbB (ORCPT ); Mon, 29 Aug 2016 00:31:01 -0400 Date: Mon, 29 Aug 2016 00:30:56 -0400 (EDT) Message-Id: <20160829.003056.872235296198766893.davem@davemloft.net> To: arnd@arndb.de Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hadarh@mellanox.com, jiri@mellanox.com, netdev@vger.kernel.org Subject: Re: [PATCH 4/5] net_sched: fix use of uninitialized ethertype variable in cls_flower From: David Miller In-Reply-To: <20160826152546.604384-5-arnd@arndb.de> References: <20160826152546.604384-1-arnd@arndb.de> <20160826152546.604384-5-arnd@arndb.de> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 28 Aug 2016 21:30:57 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Fri, 26 Aug 2016 17:25:45 +0200 > The addition of VLAN support caused a possible use of uninitialized > data if we encounter a zero TCA_FLOWER_KEY_ETH_TYPE key, as pointed > out by "gcc -Wmaybe-uninitialized": > > net/sched/cls_flower.c: In function 'fl_change': > net/sched/cls_flower.c:366:22: error: 'ethertype' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > This changes the code to only set the ethertype field if it > was nonzero, as before the patch. > > Signed-off-by: Arnd Bergmann > Fixes: 9399ae9a6cb2 ("net_sched: flower: Add vlan support") Applied.