[PATCH] eal: fix memory initialization deadlock

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Wed Aug 30 21:13:26 CEST 2023


2023-08-30 13:33 (UTC+0300), Artemy Kovalyov:
> Following these changes, the RW-lock no longer supports
> recursion, implying that a single thread shouldn't obtain a read lock if
> it already possesses one. The problem arises during initialization: the
> rte_eal_init() function acquires the memory_hotplug_lock, and later on,
> the sequence of calls rte_eal_memory_init() -> eal_memalloc_init() ->
> rte_memseg_list_walk() acquires it again without releasing it. This
> scenario introduces the risk of a potential deadlock when concurrent
> write locks are applied to the same memory_hotplug_lock. To address this
> we resolved the issue by replacing rte_memseg_list_walk() with
> rte_memseg_list_walk_thread_unsafe().

There is another call to rte_memseg_list_walk() during initialization:
from eal_dynmem_hugepage_init(), please address it too.


More information about the stable mailing list