fbarray: fix attach deadlock
authorDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Fri, 29 Mar 2019 09:52:39 +0000 (10:52 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 29 Mar 2019 11:49:35 +0000 (12:49 +0100)
commit5a98bc5e83b1562d5b688a3d5a6dd3ee977694d2
tree3fe3d55a7902c195a2fe85825170634757003930
parentc6b571574636be15faccae52b55910ed30f52746
fbarray: fix attach deadlock

rte_fbarray_attach() currently locks its internal
spinlock, but never releases it. Secondary processes
won't even start if there is more than one fbarray
to be attached to - the second rte_fbarray_attach()
would be just stuck.

Fix it by releasing the lock at the end of
rte_fbarray_attach(). I believe this was the original
intention.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/eal_common_fbarray.c