[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zr8Ouho0gi_oKIBu@Laptop-X1>
Date: Fri, 16 Aug 2024 16:32:58 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Nikolay Aleksandrov <razor@...ckwall.org>
Cc: netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
Tariq Toukan <tariqt@...dia.com>, Jianbo Liu <jianbol@...dia.com>,
Sabrina Dubroca <sd@...asysnail.net>
Subject: Re: [PATCH net-next 0/2] Bonding: support new xfrm state offload
functions
On Fri, Aug 16, 2024 at 09:06:12AM +0300, Nikolay Aleksandrov wrote:
> On 16/08/2024 06:55, Hangbin Liu wrote:
> > I planned to add the new XFRM state offload functions after Jianbo's
> > patchset [1], but it seems that may take some time. Therefore, I am
> > posting these two patches to net-next now, as our users are waiting for
> > this functionality. If Jianbo's patch is applied first, I can update these
> > patches accordingly.
> >
> > [1] https://lore.kernel.org/netdev/20240815142103.2253886-2-tariqt@nvidia.com
> >
> > Hangbin Liu (2):
> > bonding: Add ESN support to IPSec HW offload
> > bonding: support xfrm state update
> >
> > drivers/net/bonding/bond_main.c | 76 +++++++++++++++++++++++++++++++++
> > 1 file changed, 76 insertions(+)
> >
>
> (not related to this set, but to bond xfrm)
> By the way looking at bond's xfrm code, what prevents bond_ipsec_offload_ok()
> from dereferencing a null ptr?
> I mean it does:
> curr_active = rcu_dereference(bond->curr_active_slave);
> real_dev = curr_active->dev;
>
> If this is running only under RCU as the code suggests then
> curr_active_slave can change to NULL in parallel. Should there be a
> check for curr_active before deref or am I missing something?
Yes, we can do like
real_dev = curr_active ? curr_active->dev : NULL;
Thanks
Hangbin
Powered by blists - more mailing lists