netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Carlos Bilbao <carlos.bilbao@amd.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>,
	davem@davemloft.net,  linux-kernel@vger.kernel.org,
	mchan@broadcom.com, netdev@vger.kernel.org,  pabeni@redhat.com,
	prashant@broadcom.com, siva.kallam@broadcom.com
Subject: Re: [PATCH] tg3: fix array subscript out of bounds compilation error
Date: Wed, 19 Jul 2023 06:30:50 +0200	[thread overview]
Message-ID: <CANn89i+wMUGHoMzeK9ZttJUeZj-acK4M6__tYL1_o4nEdPY5=g@mail.gmail.com> (raw)
In-Reply-To: <20230718195414.4c6f359f@kernel.org>

On Wed, Jul 19, 2023 at 4:54 AM Jakub Kicinski <kuba@kernel.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@amd.com>
>
> We need a sign-off tag
> --
> pw-bot: cr

  reply	other threads:[~2023-07-19  4:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 14:34 [PATCH] tg3: fix array subscript out of bounds compilation error Carlos Bilbao
2023-07-17 19:24 ` Kuniyuki Iwashima
2023-07-18 15:52   ` Carlos Bilbao
2023-07-19  2:54     ` Jakub Kicinski
2023-07-19  4:30       ` Eric Dumazet [this message]
2023-07-21 22:29       ` Carlos Bilbao
2023-07-22  1:17         ` Michael Chan

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='CANn89i+wMUGHoMzeK9ZttJUeZj-acK4M6__tYL1_o4nEdPY5=g@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=carlos.bilbao@amd.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=prashant@broadcom.com \
    --cc=siva.kallam@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).