On 04/30/2018 01:38 PM, Anatoly Burakov wrote:
At hugepage info initialization, EAL takes out a write lock on hugetlbfs directories, and drops it after the memory init is finished. However, in non-legacy mode, if "-m" or "--socket-mem" switches are passed, this leads to a deadlock because EAL tries to allocate pages (and thus take out a write lock on hugedir) while still holding a separate hugedir write lock in EAL.Fix it by checking if write lock in hugepage info is active, and not trying to lock the directory if the hugedir fd is valid. Fixes: 1a7dc2252f28 ("mem: revert to using flock and add per-segment lockfiles") Cc: [email protected] Signed-off-by: Anatoly Burakov <[email protected]>
Tested-by: Andrew Rybchenko <[email protected]>

