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

Thomas Monjalon thomas at monjalon.net
Fri Mar 29 12:15:44 CET 2019


29/03/2019 11:42, Burakov, Anatoly:
> 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>

Applied, thanks


> 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).

We'll take this one too.




More information about the dev mailing list