[dpdk-dev] [PATCH v2] fbarray: fix attach deadlock

Burakov, Anatoly anatoly.burakov at intel.com
Fri Mar 29 11:42:55 CET 2019


On 29-Mar-19 9:52 AM, Darek Stojaczyk wrote:
> 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")
> Cc: anatoly.burakov at intel.com
> Cc: thomas at monjalon.net
> 
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk at intel.com>
> Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> ---
> v2:
>   - fixed one more case where we could unlock the spinlock
>     before locking it

Thanks for catching this!

Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

There is one more case where we do unlock on init without locking, i'll 
submit a patch separately (and will check other functions with a 
microscope just in case).

-- 
Thanks,
Anatoly


More information about the dev mailing list