From: Stephen Hemminger <stephen@networkplumber.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Leon Romanovsky <leon@kernel.org>,
davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, sd@queasysnail.net
Subject: Re: [PATCH net-next v2 1/2] net: store netdevs in an xarray
Date: Fri, 28 Jul 2023 16:23:50 -0700 [thread overview]
Message-ID: <20230728162350.2a6d4979@hermes.local> (raw)
In-Reply-To: <20230728082745.5869bc97@kernel.org>
On Fri, 28 Jul 2023 08:27:45 -0700
Jakub Kicinski <kuba@kernel.org> wrote:
> On Fri, 28 Jul 2023 07:53:04 +0300 Leon Romanovsky wrote:
> > > I'm feeding xa_alloc_cyclic() xa_limit_31b, which should take care
> > > of that, no?
> >
> > And what about xa_insert() call? Is it safe?
>
> I think so, as in - the previous code doesn't have any checks either,
> so it'd insert the negative ifindex into the hash table. Hopefully
> nobody assigns negative values to dev->ifindex, that'd be a bug in
> itself, I reckon.
>
Even inserting with ifindex = 0 would be a bug
next prev parent reply other threads:[~2023-07-28 23:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 18:55 [PATCH net-next v2 0/2] net: store netdevs in an xarray Jakub Kicinski
2023-07-26 18:55 ` [PATCH net-next v2 1/2] " Jakub Kicinski
2023-07-27 13:08 ` Leon Romanovsky
2023-07-27 15:45 ` Jakub Kicinski
2023-07-28 4:53 ` Leon Romanovsky
2023-07-28 15:27 ` Jakub Kicinski
2023-07-28 23:23 ` Stephen Hemminger [this message]
2023-07-29 0:07 ` Jakub Kicinski
2023-07-26 18:55 ` [PATCH net-next v2 2/2] net: convert some netlink netdev iterators to depend on the xarray Jakub Kicinski
2023-07-27 13:10 ` Leon Romanovsky
2023-07-28 19:00 ` [PATCH net-next v2 0/2] net: store netdevs in an xarray patchwork-bot+netdevbpf
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=20230728162350.2a6d4979@hermes.local \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
/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).