[PATCH v2 3/4] timer: fix function to stop all timers

Stephen Hemminger stephen at networkplumber.org
Wed Aug 10 21:38:33 CEST 2022


On Wed, 10 Aug 2022 19:29:36 +0000
"Carrillo, Erik G" <erik.g.carrillo at intel.com> wrote:

> Hi Harish,
> 
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k at intel.com>
> > Sent: Wednesday, August 10, 2022 2:10 AM
> > To: Carrillo, Erik G <erik.g.carrillo at intel.com>
> > Cc: dev at dpdk.org; stable at dpdk.org
> > Subject: [PATCH v2 3/4] timer: fix function to stop all timers
> > 
> > There is a possibility of deadlock in this API, as same spinlock is tried to be
> > acquired in nested manner.
> > 
> > In timer_del function, if the previous owner and current owner lcore are  
> 
> It might be clearer to say something like:
> 
>  "If the lcore that is stopping the timer is different from the lcore that owns the timer, the timer list lock is acquired in timer_del(), even if local_is_locked is true.  Because the same lock was already acquired in rte_timer_stop_all(), the thread will hang."
>   

Yes, the timer owner flag acts like a lock and this is AB BA deadlock


More information about the dev mailing list