diff options
author | David Gow <[email protected]> | 2024-04-12 10:59:01 +0800 |
---|---|---|
committer | Shuah Khan <[email protected]> | 2024-05-06 14:22:02 -0600 |
commit | 1eb69ded805103ce3ddc8b1a207abd8c24ca9e63 (patch) | |
tree | 9e8afefdc5a53cb728cb11881ce3f8786d024f64 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 170c31737cf31770916c6cbadab04c5134f0d961 (diff) |
kunit: Fix race condition in try-catch completion
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: 93533996100c ("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]>
Reviewed-by: Rae Moar <[email protected]>
Tested-by: Miguel Ojeda <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions