[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230728170738.760006ae@kernel.org>
Date: Fri, 28 Jul 2023 17:07:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Leon Romanovsky <leon@...nel.org>, davem@...emloft.net,
netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
sd@...asysnail.net
Subject: Re: [PATCH net-next v2 1/2] net: store netdevs in an xarray
On Fri, 28 Jul 2023 16:23:50 -0700 Stephen Hemminger wrote:
> > 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
... and that could actually happen if we allocate and the indexes
have wrapped :S We need better limit. I'll send a fix.
Powered by blists - more mailing lists