Skip to content

selftests/mm: fix deadlock after pthread_create

Edward Liaw linux-kselftest linux-mm lkml 1 version Applied

Status from this message: [merged mm-hotfixes-stable] selftests-mm-fix-deadlock-for-fork-after-pthread_create-on-arm.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2selftests/mm: replace atomic_bool with pthread_barrier_ttools/testing/selftests/mm/uffd-common.c tools/testing/selftests/mm/uffd-common.h tools/testing/selftests/mm/uffd-unit-tests.c+12 -103 repliesApplied
2/2selftests/mm: fix deadlock for fork after pthread_create on ARMtools/testing/selftests/mm/uffd-unit-tests.c+7 -00 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMuhammad Usama Anjum
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] selftests/mm: fix deadlock after pthread_create

On Android arm, pthread_create followed by a fork caused a deadlock in the case where the fork required work to be completed by the created thread.

Updated the synchronization primitive to use pthread_barrier instead of atomic_bool.

Applied the same fix to the wp-fork-with-event test.

Edward Liaw (2):
selftests/mm: replace atomic_bool with pthread_barrier_t selftests/mm: fix deadlock for fork after pthread_create on ARM

 tools/testing/selftests/mm/uffd-common.c     |  5 +++--
 tools/testing/selftests/mm/uffd-common.h     |  3 +--
 tools/testing/selftests/mm/uffd-unit-tests.c | 21 ++++++++++++++------
 3 files changed, 19 insertions(+), 10 deletions(-)

--
2.46.1.824.gd892dcdcdd-goog