From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6AA91A0093 for ; Tue, 19 May 2020 14:58:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 609D71D5FB; Tue, 19 May 2020 14:58:51 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 5C0CC1D5FB for ; Tue, 19 May 2020 14:58:50 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id y3so15837865wrt.1 for ; Tue, 19 May 2020 05:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pbZGJg4Nd2/3l7/U5XE3xrQH8Z8pSLCWyqNtZJgyBFA=; b=iQ0qw7t9HLqg0bDR9D9enngx2aI0dvcdKqhI5Kq6f0dlFJKB/iKQMmvAzsS9xGgfh+ FmkQgWjF1paYEgjfzQUoVjo4IL6+c+3DohW2f6GlyO43ObnSfK76t1YVAoCtjRIA/bMW yDNN5zn+e5bcuj4/QsBGsMi+GLF8cZdWfNaxXz+mSHMWULs5aLYv6UNzJtZ6z0fi28PQ b/sJPeruJVlKrjN+Aa87oTFEZoz0vVc2ePXxxD8Yk1a9sInM5FTSM6pO9JmGS8Mjj3Nx PQbl4XvzDpaOo87b00xZ4hu327Zb0zinVOrAQT2rpkxYuWvLPhEFixIyZfEjoqGUfVSA BOWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pbZGJg4Nd2/3l7/U5XE3xrQH8Z8pSLCWyqNtZJgyBFA=; b=caaWnjJ1CdHgQ4kfKU7Z3UcP2AyRd3xxKK+P2JCMg3fLKYsjldLLxv3mMO0fznlRrB fJNWbShBtkTZ6YmBZNcf+vknEwpQDVkVuuSyU/vR+FNj9soeCfS7gcHSVLRlgg3hycAg Vtu5G4Ou3JLDR1V4yggU54SlXTEW+9s+PWamjbAB+ONZ5ld84WaXBhE6XESDModSQOUr IL6G2u7iaLaRRK1SHXtKP4LighZDA0437pkA5IXZpRz57iCvz1T8EzK1L68gyV6M9azL DRKI3VDcXRW1M3g+WpQZvA2/WAti+Uk2YXNARZRPsnHdh0JJALdqOEGd2CB6EYc6ZUuQ x0xg== X-Gm-Message-State: AOAM530G39mCe6jqq1TeBcEUll6pyxxDnEzWhNJm6VBvuDnl9eV8Zv08 1HG3VFjy2y79KYFMkW0yOqs= X-Google-Smtp-Source: ABdhPJzwFEmoVslZ3BMkt7TB2xAwI44s+QHRBYKfR/RMvpJZvJZho6uIzXyz2FVKUC2EgPz5WlYZ0A== X-Received: by 2002:a5d:5751:: with SMTP id q17mr26079138wrw.106.1589893130146; Tue, 19 May 2020 05:58:50 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id r3sm3684644wmh.48.2020.05.19.05.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 05:58:49 -0700 (PDT) From: luca.boccassi@gmail.com To: Harry van Haaren Cc: David Marchand , Aaron Conole , dpdk stable Date: Tue, 19 May 2020 13:53:22 +0100 Message-Id: <20200519125804.104349-12-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519125804.104349-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'service: fix crash on exit' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From c20055f4716d024b388c5914272192c271747e31 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Wed, 11 Mar 2020 14:39:27 +0000 Subject: [PATCH] service: fix crash on exit [ upstream commit 33666b448f15687ceaf61eac405d945391fe7066 ] This commit releases all service cores from their role, returning them to ROLE_RTE on rte_service_finalize(). This fixes an issue relating to the service cores causing a race-condition on rte_eal_cleanup(), where the service core could still be executing while the main thread has already free-d the service memory, leading to a segfault. Fixes: da23f0aa87d8 ("service: fix memory leak with new function") Reported-by: David Marchand Reported-by: Aaron Conole Signed-off-by: David Marchand Signed-off-by: Harry van Haaren Acked-by: Aaron Conole --- lib/librte_eal/common/rte_service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 7e537b8cd2..b0b78baabd 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -122,6 +122,9 @@ rte_service_finalize(void) if (!rte_service_library_initialized) return; + rte_service_lcore_reset_all(); + rte_eal_mp_wait_lcore(); + rte_free(rte_services); rte_free(lcore_states); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 13:56:19.311858395 +0100 +++ 0012-service-fix-crash-on-exit.patch 2020-05-19 13:56:18.175501026 +0100 @@ -1,8 +1,10 @@ -From 33666b448f15687ceaf61eac405d945391fe7066 Mon Sep 17 00:00:00 2001 +From c20055f4716d024b388c5914272192c271747e31 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Wed, 11 Mar 2020 14:39:27 +0000 Subject: [PATCH] service: fix crash on exit +[ upstream commit 33666b448f15687ceaf61eac405d945391fe7066 ] + This commit releases all service cores from their role, returning them to ROLE_RTE on rte_service_finalize(). @@ -12,7 +14,6 @@ free-d the service memory, leading to a segfault. Fixes: da23f0aa87d8 ("service: fix memory leak with new function") -Cc: stable@dpdk.org Reported-by: David Marchand Reported-by: Aaron Conole