All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: sched: fix initialiser warning in sch_frag.c
@ 2021-09-19 22:40 Russell King (Oracle)
  2021-09-19 22:49 ` Russell King (Oracle)
  2021-09-20  9:08 ` Davide Caratti
  0 siblings, 2 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2021-09-19 22:40 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, Davide Caratti,
	Marcelo Ricardo Leitner, netdev

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@ellerman.id.au>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-20 12:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-19 22:40 [PATCH net] net: sched: fix initialiser warning in sch_frag.c Russell King (Oracle)
2021-09-19 22:49 ` Russell King (Oracle)
2021-09-20  9:08 ` Davide Caratti
2021-09-20 12:49   ` Russell King (Oracle)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.