[PATCH v7 2/3] timer: fix function to stop all timers

Naga Harish K, S V s.v.naga.harish.k at intel.com
Mon Sep 26 07:21:13 CEST 2022


Hi Thomas,
    Did you get a chance to review this patch?
Without this patch, the periodic event timer tests for SW timer adapter hangs.

-Harish

> -----Original Message-----
> From: Jerin Jacob <jerinjacobk at gmail.com>
> Sent: Thursday, September 15, 2022 12:12 PM
> To: Naga Harish K, S V <s.v.naga.harish.k at intel.com>; Thomas Monjalon
> <thomas at monjalon.net>
> Cc: jerinj at marvell.com; dev at dpdk.org; Carrillo, Erik G
> <erik.g.carrillo at intel.com>; pbhagavatula at marvell.com;
> sthotton at marvell.com; stable at dpdk.org
> Subject: Re: [PATCH v7 2/3] timer: fix function to stop all timers
> 
> On Wed, Sep 14, 2022 at 9:03 PM Naga Harish K S V
> <s.v.naga.harish.k at intel.com> wrote:
> >
> > There is a possibility of deadlock in this API, as same spinlock is
> > tried to be acquired in nested manner.
> >
> > 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.
> >
> > This patch removes the acquisition of nested lock.
> >
> > Fixes: 821c51267bcd63a ("timer: add function to stop all timers in a
> > list")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k at intel.com>
> > ---
> >  lib/timer/rte_timer.c | 13 ++++---------
> 
> Since this change in lib/timer. Delegating this patch to @Thomas Monjalon


More information about the stable mailing list