Skip to content

fix process shared pthread mutexes

Stephen Hemminger dpdk-dev 2 versions – Applied

Status from this message: Applied to next-net with helper.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 3 repliesApplied
  2. v16 patches 1 replySuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6ethdev: fix flow_ops_mutex for multi-processlib/ethdev/ethdev_driver.c+21 -10 replies
2/6net/failsafe: fix hotplug_mutex for multi-processdrivers/net/failsafe/failsafe.c+12 -30 replies
3/6net/atlantic: fix mbox_mutex for multi-processdrivers/net/atlantic/atl_ethdev.c+13 -10 replies
4/6net/axgbe: fix mutexes for multi-processdrivers/net/axgbe/axgbe_ethdev.c+15 -40 replies
5/6net/bnxt: fix mutexes for multi-processdrivers/net/bnxt/bnxt_ethdev.c drivers/net/bnxt/bnxt_txq.c drivers/net/bnxt/bnxt_util.c +4 more+26 -90 replies
6/6net/hinic: fix mutexes for multi-processdrivers/net/hinic/base/hinic_compat.h+12 -10 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchKonstantin Ananyev
SeriesSeries-Acked-by
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v2 thread

Cover letter [PATCH v2 0/6] fix process shared pthread mutexes

Several drivers and the ethdev layer initialize pthread mutexes in shared memory with default (process-private) attributes. This is undefined behavior when secondary processes use them.

This series adds PTHREAD_PROCESS_SHARED to all affected mutexes. All are on control paths (firmware mailbox, hotplug, flow ops, PHY negotiation) where sleeping is acceptable.

See POSIX spec:
https://pubs.opengroup.org/onlinepubs/009696899/functions/pthread_mutexattr_getpshared.html

Bugzilla ID: 662

v2 - fix build on Windows which does not need this.

Stephen Hemminger (6):
ethdev: fix flow_ops_mutex for multi-process net/failsafe: fix hotplug_mutex for multi-process net/atlantic: fix mbox_mutex for multi-process net/axgbe: fix mutexes for multi-process net/bnxt: fix mutexes for multi-process net/hinic: fix mutexes for multi-process

 drivers/net/atlantic/atl_ethdev.c      | 14 +++++++++++++-
 drivers/net/axgbe/axgbe_ethdev.c       | 19 +++++++++++++++----
 drivers/net/bnxt/bnxt_ethdev.c         | 11 ++++++-----
 drivers/net/bnxt/bnxt_txq.c            |  3 ++-
 drivers/net/bnxt/bnxt_util.c           | 13 +++++++++++++
 drivers/net/bnxt/bnxt_util.h           |  2 ++
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c     |  2 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c  |  2 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c |  2 +-
 drivers/net/failsafe/failsafe.c        | 15 ++++++++++++---
 drivers/net/hinic/base/hinic_compat.h  | 13 ++++++++++++-
 lib/ethdev/ethdev_driver.c             | 22 +++++++++++++++++++++-
 12 files changed, 99 insertions(+), 19 deletions(-)
Signature · 1 line
2.53.0