From: Miguel Ojeda <ojeda@kernel.org>
To: davidgow@google.com
Cc: brendan.higgins@linux.dev, dan.carpenter@linaro.org,
keescook@chromium.org, kunit-dev@googlegroups.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux@roeck-us.net, lkft@linaro.org, mic@digikod.net,
naresh.kamboju@linaro.org, rmoar@google.com,
skhan@linuxfoundation.org, will@kernel.org,
Miguel Ojeda <ojeda@kernel.org>
Subject: Re: [PATCH] kunit: Fix race condition in try-catch completion
Date: Sat, 13 Apr 2024 23:04:10 +0200 [thread overview]
Message-ID: <20240413210411.441424-1-ojeda@kernel.org> (raw)
In-Reply-To: <20240412025903.489470-1-davidgow@google.com>
On Thu, Apr 11, 2024 at 10:59 PM David Gow <davidgow@google.com> wrote:
>
> KUnit's try-catch infrastructure now uses vfork_done, which is always
> set to a valid completion when a kthread is created, but which is set to
> NULL once the thread terminates. This creates a race condition, where
> the kthread exits before we can wait on it.
>
> Keep a copy of vfork_done, which is taken before we wake_up_process()
> and so valid, and wait on that instead.
>
> Fixes: 4de2a8e4cca4 ("kunit: Handle test faults")
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Closes: https://lore.kernel.org/lkml/20240410102710.35911-1-naresh.kamboju@linaro.org/
> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Acked-by: Mickaël Salaün <mic@digikod.net>
> Signed-off-by: David Gow <davidgow@google.com>
I noticed it with the Rust tests too, and indeed this fixed it:
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Thanks!
Cheers,
Miguel
prev parent reply other threads:[~2024-04-13 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 2:59 [PATCH] kunit: Fix race condition in try-catch completion David Gow
2024-04-12 21:32 ` Rae Moar
2024-04-13 21:04 ` Miguel Ojeda [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=20240413210411.441424-1-ojeda@kernel.org \
--to=ojeda@kernel.org \
--cc=brendan.higgins@linux.dev \
--cc=dan.carpenter@linaro.org \
--cc=davidgow@google.com \
--cc=keescook@chromium.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkft@linaro.org \
--cc=mic@digikod.net \
--cc=naresh.kamboju@linaro.org \
--cc=rmoar@google.com \
--cc=skhan@linuxfoundation.org \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.