[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241211183700.1dff156f@kernel.org>
Date: Wed, 11 Dec 2024 18:37:00 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Bernard Metzler <bmt@...ich.ibm.com>, linux-rdma@...r.kernel.org,
leon@...nel.org, linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
syzkaller-bugs@...glegroups.com, zyjzyj2000@...il.com,
syzbot+4b87489410b4efd181bf@...kaller.appspotmail.com
Subject: Re: [PATCH] RDMA/siw: Remove direct link to net_device
On Wed, 11 Dec 2024 12:00:55 -0400 Jason Gunthorpe wrote:
> > > ifindex is only stable so long as you are holding a reference on the
> > > netdev..
> >
> > Does not compute. Can you elaborate what you mean, Jason?
>
> I mean you can't replace a netdev pointer with an ifindex, you can't
> reliably get back to the same netdev from ifindex alone.
With the right use of locking and the netdev notifier the ifindex
is as good as a pointer. I just wanted to point out that taking
a reference makes no difference here.
Powered by blists - more mailing lists