public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: samasth.norway.ananda@oracle.com
Cc: stable@vger.kernel.org, harshit.m.mogalapalli@oracle.com,
	yonghong.song@linux.dev, ast@kernel.org
Subject: Re: [External] : Re: [PATCH 6.6.y] selftests/bpf: Remove flaky test_btf_id test
Date: Fri, 2 Feb 2024 19:37:06 -0800	[thread overview]
Message-ID: <2024020259-cube-whacking-8c37@gregkh> (raw)
In-Reply-To: <a602e2cc-292e-40bc-8ab4-8c1b339ccd78@oracle.com>

On Fri, Feb 02, 2024 at 05:33:36PM -0800, samasth.norway.ananda@oracle.com wrote:
> 
> 
> On 2/2/24 5:31 PM, Greg KH wrote:
> > On Thu, Feb 01, 2024 at 07:45:45PM -0800, Samasth Norway Ananda wrote:
> > > From: Yonghong Song <yonghong.song@linux.dev>
> > > 
> > > [ Upstream commit 56925f389e152dcb8d093435d43b78a310539c23 ]
> > > 
> > > With previous patch, one of subtests in test_btf_id becomes
> > > flaky and may fail. The following is a failing example:
> > > 
> > >    Error: #26 btf
> > >    Error: #26/174 btf/BTF ID
> > >      Error: #26/174 btf/BTF ID
> > >      btf_raw_create:PASS:check 0 nsec
> > >      btf_raw_create:PASS:check 0 nsec
> > >      test_btf_id:PASS:check 0 nsec
> > >      ...
> > >      test_btf_id:PASS:check 0 nsec
> > >      test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1
> > > 
> > > The test tries to prove a btf_id not available after the map is closed.
> > > But btf_id is freed only after workqueue and a rcu grace period, compared
> > > to previous case just after a rcu grade period.
> > > Depending on system workload, workqueue could take quite some time
> > > to execute function bpf_map_free_deferred() which may cause the test failure.
> > > Instead of adding arbitrary delays, let us remove the logic to
> > > check btf_id availability after map is closed.
> > > 
> > > Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
> > > Link: https://urldefense.com/v3/__https://lore.kernel.org/r/20231214203820.1469402-1-yonghong.song@linux.dev__;!!ACWV5N9M2RV99hQ!I-3G5NyOo-Xom0b0NmUHYWm_hs6Ai1qD4A9smNew_5_8jyyEXbISpxoAPa4wSD_eXQr-IOAd4_TM2NBscejS$
> > > Signed-off-by: Alexei Starovoitov <ast@kernel.org>
> > > [Samasth: backport for 6.6.y]
> > > Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
> > > ---
> > > Above patch is a fix for 59e5791f59dd ("bpf: Fix a race condition between
> > > btf_put() and map_free()"). While the commit causing the error is
> > > present in 6.6.y the fix is not present.
> > > ---
> > >   tools/testing/selftests/bpf/prog_tests/btf.c | 5 -----
> > >   1 file changed, 5 deletions(-)
> > 
> > What about 6.7 as well?  Shouldn't this change be there too?
> 
> Yes, it should be there on 6.7 as well. Sorry, I should have mentioned that.

thanks, now queued up.

greg k-h

      reply	other threads:[~2024-02-03  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02  3:45 [PATCH 6.6.y] selftests/bpf: Remove flaky test_btf_id test Samasth Norway Ananda
2024-02-03  1:31 ` Greg KH
2024-02-03  1:33   ` [External] : " samasth.norway.ananda
2024-02-03  3:37     ` Greg KH [this message]

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=2024020259-cube-whacking-8c37@gregkh \
    --to=greg@kroah.com \
    --cc=ast@kernel.org \
    --cc=harshit.m.mogalapalli@oracle.com \
    --cc=samasth.norway.ananda@oracle.com \
    --cc=stable@vger.kernel.org \
    --cc=yonghong.song@linux.dev \
    /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