public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 00/12] Fix various NPTL synchronization issues
@ 2022-05-31 17:52 Adhemerval Zanella
  2022-05-31 17:52 ` [PATCH v3 01/12] nptl: Set cancellation type and state on pthread_exit (BZ #28267) Adhemerval Zanella
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Adhemerval Zanella @ 2022-05-31 17:52 UTC (permalink / raw)
  To: libc-alpha

Patch 01 is a conformance fix to set both the cancellation type
and status on thread pthread_exit. 

Patch 02 fixes a potential issue with robust mutexes on architectures
without a working set_rebust_list syscall.

Patch 03 is the main change of this patchset, it uses a different
field instead of the pthread 'tid' to synchrnonize the internal
thread state (BZ#19951).

Patches 04 to 12 extend the same 'tid' access fix to other pthread
functions that uses the member.

Changes in v3:
 
* Rebased against master.
* Return EINVAL instead of ESRCH for invalid pthread_t on getters
  and setters.

Adhemerval Zanella (12):
  nptl: Set cancellation type and state on pthread_exit (BZ #28267)
  nptl: Handle robust PI mutexes for !__ASSUME_SET_ROBUST_LIST (BZ
    #28268)
  nptl: Do not use pthread set_tid_address as state synchronization (BZ
    #19951)
  nptl: Use exit_lock when accessing TID on pthread_getaffinity_np
  nptl: Use exit_lock when accessing TID on pthread_getcpuclockid
  nptl: Use exit_lock when accessing TID on pthread_setschedparam
  nptl: Use exit_lock when accessing TID on pthread_getschedparam
  nptl: Use exit_lock when accessing TID on pthread_getname_np
  nptl: Use exit_lock when accessing TID on pthread_setname_np
  nptl: Use exit_lock when accessing TID on pthread_sigqueue
  nptl: Use exit_lock when accessing TID on pthread_setschedprio
  nptl: Remove INVALID_TD_P

 nptl/Makefile                        |   3 +-
 nptl/cancellation.c                  |  31 ++++++-
 nptl/descr.h                         |  26 +++---
 nptl/nptl-stack.h                    |   2 +-
 nptl/pthread_cancel.c                |   4 +-
 nptl/pthread_clockjoin.c             |   2 +-
 nptl/pthread_create.c                |  96 ++++++++++++--------
 nptl/pthread_detach.c                |  40 ++++-----
 nptl/pthread_exit.c                  |   4 +-
 nptl/pthread_getaffinity.c           |  30 ++++---
 nptl/pthread_getattr_np.c            |   2 +-
 nptl/pthread_getcpuclockid.c         |  26 +++---
 nptl/pthread_getname.c               |  65 ++++++++------
 nptl/pthread_getschedparam.c         |  55 ++++++------
 nptl/pthread_join.c                  |   2 +-
 nptl/pthread_join_common.c           | 124 +++++++++----------------
 nptl/pthread_setname.c               |  52 ++++++-----
 nptl/pthread_setschedparam.c         |  51 ++++++-----
 nptl/pthread_setschedprio.c          |  45 +++++-----
 nptl/pthread_sigqueue.c              |  56 ++++++------
 nptl/pthread_testcancel.c            |   5 +-
 nptl/pthread_timedjoin.c             |   2 +-
 nptl/pthread_tryjoin.c               |  18 ++--
 nptl/tst-cleanup5.c                  | 129 +++++++++++++++++++++++++++
 sysdeps/nptl/dl-tls_init_tp.c        |   4 +-
 sysdeps/nptl/libc_start_call_main.h  |   7 ++
 sysdeps/nptl/pthreadP.h              |  22 ++---
 sysdeps/pthread/Makefile             |   1 +
 sysdeps/pthread/tst-pthread-exited.c |  94 +++++++++++++++++++
 sysdeps/pthread/tst-thrd-detach.c    |  16 ++--
 30 files changed, 642 insertions(+), 372 deletions(-)
 create mode 100644 nptl/tst-cleanup5.c
 create mode 100644 sysdeps/pthread/tst-pthread-exited.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-05-31 17:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 17:52 [PATCH v3 00/12] Fix various NPTL synchronization issues Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 01/12] nptl: Set cancellation type and state on pthread_exit (BZ #28267) Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 02/12] nptl: Handle robust PI mutexes for !__ASSUME_SET_ROBUST_LIST (BZ #28268) Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 03/12] nptl: Do not use pthread set_tid_address as state synchronization (BZ #19951) Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 04/12] nptl: Use exit_lock when accessing TID on pthread_getaffinity_np Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 05/12] nptl: Use exit_lock when accessing TID on pthread_getcpuclockid Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 06/12] nptl: Use exit_lock when accessing TID on pthread_setschedparam Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 07/12] nptl: Use exit_lock when accessing TID on pthread_getschedparam Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 08/12] nptl: Use exit_lock when accessing TID on pthread_getname_np Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 09/12] nptl: Use exit_lock when accessing TID on pthread_setname_np Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 10/12] nptl: Use exit_lock when accessing TID on pthread_sigqueue Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 11/12] nptl: Use exit_lock when accessing TID on pthread_setschedprio Adhemerval Zanella
2022-05-31 17:52 ` [PATCH v3 12/12] nptl: Remove INVALID_TD_P Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).