[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1mS5U9-002wsa-TC@rmk-PC.armlinux.org.uk>
Date: Sun, 19 Sep 2021 23:40:33 +0100
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Davide Caratti <dcaratti@...hat.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
netdev@...r.kernel.org
Subject: [PATCH net] net: sched: fix initialiser warning in sch_frag.c
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 <mpe@...erman.id.au>
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
---
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);
--
2.30.2
Powered by blists - more mailing lists