[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+wMUGHoMzeK9ZttJUeZj-acK4M6__tYL1_o4nEdPY5=g@mail.gmail.com>
Date: Wed, 19 Jul 2023 06:30:50 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Carlos Bilbao <carlos.bilbao@....com>,
Kuniyuki Iwashima <kuniyu@...zon.com>, davem@...emloft.net,
linux-kernel@...r.kernel.org, mchan@...adcom.com,
netdev@...r.kernel.org, pabeni@...hat.com, prashant@...adcom.com,
siva.kallam@...adcom.com
Subject: Re: [PATCH] tg3: fix array subscript out of bounds compilation error
On Wed, Jul 19, 2023 at 4:54 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Tue, 18 Jul 2023 10:52:39 -0500 Carlos Bilbao wrote:
> > >> Fix encountered compilation error in tg3.c where an array subscript was
> > >
> > > What is the error ?
> >
> > drivers/net/ethernet/broadcom/tg3.c: In function ‘tg3_init_one’:
>
> What compiler are you using? Any extra flags?
>
> I remember seeing this warning too, but I can't repro it now (gcc 13.1;
> clang 16).
Same here, I think I was seeing this 4 or 5 years ago.
I ignored the warning at that time because we were using an old compiler.
>
> > >> above the array bounds of 'struct tg3_napi[5]'. Add an additional check in
> > >> the for loop to ensure that it does not exceed the bounds of
> > >> 'struct tg3_napi' (defined by TG3_IRQ_MAX_VECS).
> > >>
> > >> Reviewed-By: Carlos Bilbao <carlos.bilbao@....com>
>
> We need a sign-off tag
> --
> pw-bot: cr
Powered by blists - more mailing lists