numam-dpdk/lib/librte_eal/include
Diogo Behrens 021b698eb5 mcslock: fix hang in weak memory model
The initialization me->locked=1 in lock() must happen before
next->locked=0 in unlock(), otherwise a thread may hang forever,
waiting me->locked become 0. On weak memory systems (such as ARMv8),
the current implementation allows me->locked=1 to be reordered with
announcing the node (pred->next=me) and, consequently, to be
reordered with next->locked=0 in unlock().

This fix adds a release barrier to pred->next=me, forcing
me->locked=1 to happen before this operation.

Fixes: 2173f3333b ("mcslock: add MCS queued lock implementation")
Cc: stable@dpdk.org

Signed-off-by: Diogo Behrens <diogo.behrens@huawei.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2020-11-25 17:30:04 +01:00
..
generic mcslock: fix hang in weak memory model 2020-11-25 17:30:04 +01:00
meson.build eal: add power management intrinsics 2020-10-29 22:46:31 +01:00
rte_alarm.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_bitmap.h bitmap: add init with all bits set 2020-04-15 16:10:12 +02:00
rte_bitops.h eal: introduce macro for bit definition 2020-07-28 18:27:46 +02:00
rte_branch_prediction.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_bus.h eal: replace usage of blacklist/whitelist in enums 2020-11-16 00:11:22 +01:00
rte_class.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_common.h eal: add macro to mark macros as deprecated 2020-10-20 11:42:29 +02:00
rte_compat.h eal: add internal ABI tag definition 2020-04-25 17:01:00 +02:00
rte_debug.h eal: simplify exit functions 2020-10-15 22:33:47 +02:00
rte_dev.h eal: replace usage of blacklist/whitelist in enums 2020-11-16 00:11:22 +01:00
rte_devargs.h eal: replace usage of blacklist/whitelist in enums 2020-11-16 00:11:22 +01:00
rte_eal_interrupts.h eal/linux: add function to allow interruptible epoll 2020-10-19 12:17:25 +02:00
rte_eal_memconfig.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_eal_paging.h mem: drop mapping API workaround 2020-09-21 10:12:10 +02:00
rte_eal_trace.h eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
rte_eal.h eal: remove comment about old partition option 2020-10-23 19:25:21 +02:00
rte_errno.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_fbarray.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_function_versioning.h build: fix version map file references in documentation 2020-10-22 14:11:49 +02:00
rte_hexdump.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_hypervisor.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_interrupts.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_keepalive.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_launch.h eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
rte_lcore.h eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
rte_log.h log: hide internal variable 2020-09-16 18:37:11 +02:00
rte_malloc.h malloc: add alloc_size attribute to functions 2020-10-19 16:25:43 +02:00
rte_memory.h mem: remove physical address aliases 2020-09-19 00:25:35 +02:00
rte_memzone.h mem: remove physical address aliases 2020-09-19 00:25:35 +02:00
rte_pci_dev_feature_defs.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_pci_dev_features.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_per_lcore.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_random.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_reciprocal.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_service_component.h service: fix C++ linkage 2020-07-09 16:23:57 +02:00
rte_service.h service: retrieve lcore active state 2020-09-21 16:37:11 +02:00
rte_string_fns.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_tailq.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_test.h eal: change the log level for test asserts 2020-07-17 10:47:56 +02:00
rte_time.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_trace_point_register.h trace: simplify trace point registration 2020-07-05 21:34:21 +02:00
rte_trace_point.h trace: fix C++ compilation 2020-09-17 11:13:44 +02:00
rte_trace.h trace: introduce new subsystem 2020-04-23 15:39:06 +02:00
rte_uuid.h eal: fix uuid header dependencies 2020-07-07 14:06:49 +02:00
rte_version.h eal: move common header files 2020-03-31 13:08:55 +02:00
rte_vfio.h eal: move common header files 2020-03-31 13:08:55 +02:00