From patchwork Sun Sep 19 22:40:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 12504477 X-Patchwork-Delegate: kuba@kernel.org 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=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 9A48EC433EF for ; Sun, 19 Sep 2021 22:40:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C7D960C51 for ; Sun, 19 Sep 2021 22:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbhISWmL (ORCPT ); Sun, 19 Sep 2021 18:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbhISWmK (ORCPT ); Sun, 19 Sep 2021 18:42:10 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 018B4C061574 for ; Sun, 19 Sep 2021 15:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1Isc+Bx6LON9etx9O/99WDdKqFUamh4vAScZqFf9/BU=; b=xbHovcB7pMTkpWofkKHC9DggxF 5slIvcai2YTKedqGLQb3aHsIc48EnqEqiBE+jIecp7Fovg+jlGYdFpBf6EzE6w/bCvYisQWfJTFuf gkUsR2u1rTsSZfbpqnQ9RVoQ2Z9HG0UwKecc9Bf2HifdFj2xVyAYGxmP75VOtFFtWygXAeRiHzRSx 9ViIpwfMkyO7lpmGpo5Ol/n3JYQwvTt6Fd9/ixlVnGQjBSigZVr3amlVv9Q3ciY6KZTbEgxly3fQB kbL5/yoEAMWr69WozOhz/32H3/Xgbc/wPjRl9mGHM563hhe74U9iq4LbOM+MphlT+WPvnwerZEa2f 9EmkFCeA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:41446 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mS5UA-00018h-Eq; Sun, 19 Sep 2021 23:40:34 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mS5U9-002wsa-TC; Sun, 19 Sep 2021 23:40:33 +0100 From: "Russell King (Oracle)" To: "David S. Miller" , Jakub Kicinski Cc: Jamal Hadi Salim , Cong Wang , Jiri Pirko , Davide Caratti , Marcelo Ricardo Leitner , netdev@vger.kernel.org Subject: [PATCH net] net: sched: fix initialiser warning in sch_frag.c MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Sun, 19 Sep 2021 23:40:33 +0100 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Debian gcc 10.2.1 complains thusly: net/sched/sch_frag.c:93:10: warning: missing braces around initializer [-Wmissing-braces] struct rtable sch_frag_rt = { 0 }; ^ net/sched/sch_frag.c:93:10: warning: (near initialization for 'sch_frag_rt.dst') [-Wmissing-braces] Fix it by removing the unnecessary '0' initialiser, leaving the braces. Fixes: 31fe34a0118e ("net/sched: sch_frag: fix stack OOB read while fragmenting IPv4 packets") Suggested-by: Michael Ellerman Signed-off-by: Russell King (Oracle) --- net/sched/sch_frag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_frag.c b/net/sched/sch_frag.c index 8c06381391d6..ab359d63287c 100644 --- a/net/sched/sch_frag.c +++ b/net/sched/sch_frag.c @@ -90,7 +90,7 @@ static int sch_fragment(struct net *net, struct sk_buff *skb, } if (skb_protocol(skb, true) == htons(ETH_P_IP)) { - struct rtable sch_frag_rt = { 0 }; + struct rtable sch_frag_rt = { }; unsigned long orig_dst; sch_frag_prepare_frag(skb, xmit);