All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Davide Caratti <dcaratti@redhat.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] net: sched: fix initialiser warning in sch_frag.c
Date: Sun, 19 Sep 2021 23:49:22 +0100	[thread overview]
Message-ID: <YUe+cq0CLRIA2Pn2@shell.armlinux.org.uk> (raw)
In-Reply-To: <E1mS5U9-002wsa-TC@rmk-PC.armlinux.org.uk>

On Sun, Sep 19, 2021 at 11:40:33PM +0100, Russell King (Oracle) wrote:
> Debian gcc 10.2.1 complains thusly:

Correction: this is with ARM gcc 4.9.4 with the 5.14 kernel which is
no longer supported by 5.15-rc. Please ignore.

> 
> 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
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-09-19 22:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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) [this message]
2021-09-20  9:08 ` Davide Caratti
2021-09-20 12:49   ` Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YUe+cq0CLRIA2Pn2@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.