Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: "kuba@kernel.org" <kuba@kernel.org>,
	"razor@blackwall.org" <razor@blackwall.org>,
	"liuhangbin@gmail.com" <liuhangbin@gmail.com>
Cc: "andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"jarod@redhat.com" <jarod@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Tariq Toukan <tariqt@nvidia.com>, Petr Machata <petrm@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"steffen.klassert@secunet.com" <steffen.klassert@secunet.com>,
	"jv@jvosburgh.net" <jv@jvosburgh.net>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	Jianbo Liu <jianbol@nvidia.com>
Subject: Re: [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions
Date: Tue, 11 Mar 2025 21:08:49 +0000	[thread overview]
Message-ID: <f9b85a06113e2c9a7a91f3486efc06edbce4e461.camel@nvidia.com> (raw)
In-Reply-To: <20250307090332.5b556ebb@kernel.org>

On Fri, 2025-03-07 at 09:03 -0800, Jakub Kicinski wrote:
> On Fri, 7 Mar 2025 09:42:49 +0200 Nikolay Aleksandrov wrote:
> > TBH, keeping buggy code with a comment doesn't sound good to me.
> > I'd rather remove this
> > support than tell people "good luck, it might crash". It's better
> > to be safe until a
> > correct design is in place which takes care of these issues.
> 
> That's my feeling too, FWIW. I think we knew about this issue
> for a while now, the longer we wait the more users we may disrupt
> with the revert.

These are preexisting races between the bond link failover and the user
removing the xfrm states. Unless the user wants to intentionally
trigger these bugs, chances are nobody has ever encountered them in the
wild in normal operation. In steady state, bond link failover works,
and adding/removing states works. It's the combination of the two
control plane events that may have a chance to double free or leak
states.

I would not pull everything out just yet.

Today, I managed to find a solution for these races (I think), based on
a patch series I am preparing against ipsec-next with other changes
related to real_dev.

Hangbin, do you mind if I take over fixing the locking issue as part of
my series? I plan to send it upstream the following days.

Cosmin.

  parent reply	other threads:[~2025-03-11 21:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07  3:19 [PATCHv5 net 0/3] bond: fix xfrm offload issues Hangbin Liu
2025-03-07  3:19 ` [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions Hangbin Liu
2025-03-07  7:42   ` Nikolay Aleksandrov
2025-03-07  8:11     ` Hangbin Liu
2025-03-07  8:33       ` Nikolay Aleksandrov
2025-03-07 10:31         ` Hangbin Liu
2025-03-07 17:03     ` Jakub Kicinski
2025-03-10  7:53       ` Hangbin Liu
2025-03-11 21:08       ` Cosmin Ratiu [this message]
2025-03-12  1:04         ` Hangbin Liu
2025-03-08  8:54   ` Simon Horman
2025-03-10  7:22     ` Hangbin Liu
2025-03-07  3:19 ` [PATCHv5 net 2/3] bonding: fix xfrm offload feature setup on active-backup mode Hangbin Liu
2025-03-07  3:19 ` [PATCHv5 net 3/3] selftests: bonding: add ipsec offload test Hangbin Liu

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=f9b85a06113e2c9a7a91f3486efc06edbce4e461.camel@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jarod@redhat.com \
    --cc=jianbol@nvidia.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=tariqt@nvidia.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