From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B844A00C5; Thu, 15 Sep 2022 08:42:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A2FD4021D; Thu, 15 Sep 2022 08:42:03 +0200 (CEST) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id EDA1340156; Thu, 15 Sep 2022 08:42:01 +0200 (CEST) Received: by mail-qk1-f169.google.com with SMTP id f13so8323383qkk.6; Wed, 14 Sep 2022 23:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=h4zRCF1jyiKncgmax1/3bI0JrLMVjaBAkDpJZmvcdtQ=; b=m6YfrB6OJQ1T0jaPASmbjo+jodiqpODl8zEAl+JVfDyPasLJKlv1tElMGZueeOxDnd xRTj6t5qH68WKTPI5PIrQePNSJY96vapW2Y3/jtMi9epimjap0p2+8MY8Ru+LWOc1mdU A01wz1Q8l9luPeZLd7Uedf1qwpsL43+u7qc62t9PUeeVY3fTjC5XCl9nNR3F2u6CCfcG RP1Ze4TVsMG4CNIUc6YwBa/9pwHJrzYXCYVy4m02S/elBNxcoTkf5fxcBvBAqS4ZWLNs 2EYdnOy7qGSOS4lazr8egz6HuWr/Hht0klJzavvygKFXrg5DuRLZDqcKur6e8Yck1r3K xzHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=h4zRCF1jyiKncgmax1/3bI0JrLMVjaBAkDpJZmvcdtQ=; b=gQkXmURqfEbncMEMsfqmeXnommzKGU/zeN1Dh3tPkEzu29aoF2w3ewJbdFAs05EIrS W84IVWZcV+JX6G8aT1BY9BnkMwP3SJ8NBO/aEQNc2vOHojnCvf2xSBUS7o7oHyseGj1o zJcBHeRLPHS4/eXDIfxJqM+/MnvD0a0UD/f0/grHa1iunMKBpFNmUE/VCb53eCXBTwMq RCTcAJgnKUCnxC30PvLutSBkmy2abkmAGqj64i1ZWT3EfLL9cjra7WXV1RC+ZxxP7S7N 4W4VrzB+tt5oXL+iHt8Ef8QaXhPhbdlCZytKFjopKIiOt4JroT6Y7+j/9A9RSlcYf0Qp /w1g== X-Gm-Message-State: ACgBeo1+dv5Ha96uiGRJTL/+sstnrKQhbRyj4zJyzpxm1r//TiHWJHzP Yrh2uZk/D5+CIRiKA9PxCMezH02PrjVMV/14pmc= X-Google-Smtp-Source: AA6agR5BjDvooACB2a1un7FMy95QOKlFbGPCtFXNimrAzyUP6HzSZpzDAdQNBGVNGCE2r360ersSZNBIW1fOjM2lKU8= X-Received: by 2002:ae9:efc4:0:b0:6cb:e44c:723a with SMTP id d187-20020ae9efc4000000b006cbe44c723amr22033811qkg.402.1663224121334; Wed, 14 Sep 2022 23:42:01 -0700 (PDT) MIME-Version: 1.0 References: <20220914135147.1846550-1-s.v.naga.harish.k@intel.com> <20220914153319.1887248-1-s.v.naga.harish.k@intel.com> <20220914153319.1887248-2-s.v.naga.harish.k@intel.com> In-Reply-To: <20220914153319.1887248-2-s.v.naga.harish.k@intel.com> From: Jerin Jacob Date: Thu, 15 Sep 2022 12:11:35 +0530 Message-ID: Subject: Re: [PATCH v7 2/3] timer: fix function to stop all timers To: Naga Harish K S V , Thomas Monjalon Cc: jerinj@marvell.com, dev@dpdk.org, erik.g.carrillo@intel.com, pbhagavatula@marvell.com, sthotton@marvell.com, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Sep 14, 2022 at 9:03 PM Naga Harish K S V 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@dpdk.org > > Signed-off-by: Naga Harish K S V > --- > lib/timer/rte_timer.c | 13 ++++--------- Since this change in lib/timer. Delegating this patch to @Thomas Monjalon