mbox series

[0/3] selftests/mm: revert pthread_barrier change and

Message ID 20241018171734.2315053-1-edliaw@google.com (mailing list archive)
Headers show
Series selftests/mm: revert pthread_barrier change and | expand

Message

Edward Liaw Oct. 18, 2024, 5:17 p.m. UTC
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.

The previous patches incorrectly assumed that the parent would
always initialize the pthread_barrier for the child thread.  This
reverts the change and replaces the fix for wp-fork-with-event with the
original use of atomic_bool.

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

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

--
2.47.0.105.g07ac214952-goog

Comments

Andrew Morton Oct. 18, 2024, 9:13 p.m. UTC | #1
On Fri, 18 Oct 2024 17:17:21 +0000 Edward Liaw <edliaw@google.com> wrote:

> Subject: [PATCH 0/3] selftests/mm: revert pthread_barrier change and

I simply removed the " and".

> Date: Fri, 18 Oct 2024 17:17:21 +0000
> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog
> 
> 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.
> 
> The previous patches incorrectly assumed that the parent would
> always initialize the pthread_barrier for the child thread.  This
> reverts the change and replaces the fix for wp-fork-with-event with the
> original use of atomic_bool.
> 
> Edward Liaw (3):
>   Revert "selftests/mm: fix deadlock for fork after pthread_create on
>     ARM"
>   Revert "selftests/mm: replace atomic_bool with pthread_barrier_t"
>   selftests/mm: fix deadlock for fork after pthread_create with
>     atomic_bool

I added cc:stable to the first two patches as the thing-being-reverted
was cc:stable.