[PATCH v3 0/7] fix use of pthread mutex between processes
Stephen Hemminger
stephen at networkplumber.org
Thu Apr 30 19:36:15 CEST 2026
On Wed, 29 Apr 2026 11:46:37 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:
> 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
>
>
> Stephen Hemminger (7):
> eal: add helper to initialize process-shared mutex
> 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
Applied to next-net
More information about the dev
mailing list