On Thu, Apr 11, 2024 at 10:59 PM David Gow <[email protected]> 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 <[email protected]>
> Closes: 
> https://lore.kernel.org/lkml/[email protected]/
> Tested-by: Linux Kernel Functional Testing <[email protected]>
> Acked-by: Mickaël Salaün <[email protected]>
> Signed-off-by: David Gow <[email protected]>

I noticed it with the Rust tests too, and indeed this fixed it:

Tested-by: Miguel Ojeda <[email protected]>

Thanks!

Cheers,
Miguel

Reply via email to