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 7B06FA0569 for ; Thu, 12 Mar 2020 10:00:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 63B701C014; Thu, 12 Mar 2020 10:00:09 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 5523A1C014 for ; Thu, 12 Mar 2020 10:00:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584003607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aAk2kHnI/RbCI8Rb186CG9bVR9e/mnapT6y1aMtG7jE=; b=gMMYWlwVUoU8X7iK4vHj422F3KG+swzfFERtWXuUTQyuczgB7XgMnpiFP/bfxbqg22Ntty utCurlWpz8c9DtPtmg0m4536e/EugU0oy9NkdgHBS/0pP2WDThaij6BQQBwQKPcsu1Pv1/ xzabU3Z7NSpCocC7k251qUOg8DbTYIs= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-92-jf6HmV8YOkaBMO9oKeUXew-1; Thu, 12 Mar 2020 05:00:05 -0400 X-MC-Unique: jf6HmV8YOkaBMO9oKeUXew-1 Received: by mail-vk1-f200.google.com with SMTP id l19so2055908vko.3 for ; Thu, 12 Mar 2020 02:00:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5VYmBTPsuKkIdxGH3CSqOJHtHjQtO9QjGBig22ly8XQ=; b=S+fTAkbIX+W3My5irgnkw5hLwN0IxQj2m/lcg5wUoNkZ2un5KZfQW8+7EmufNTjeIq 1iM2wgJse9isOg7Vlw4OCGEX29AxHYBO0uxYnrW26aL36fOEF6IgRi5jSD/LEk39gHZT EESziXeCoYfIc1kWsc+GhIpthcZPS6R6p4jcIAuFteTqwk58J4cZ1mzSNaOdRDaeqUMC hLpE9zEH4Wk5pehOR/AtQdKBDCxuugVPuz5g1QKYTM2rTO1LVDckhYLhCWuUbS69SFd/ uVizjlJR86RcIUsRxumk6oq9R1HqIimoavkiAiHSrFQy2L6bvpefAkwSrwRjCFccpPnL o5JQ== X-Gm-Message-State: ANhLgQ0lLr/GlHyCy6IsZtr8XfgqQF4Q9jtUd4434KK4HlI8bH1f10uR 5lef+owJRp2Hrq+KMpkze+wIrPB+2TRx/KfaLhhNS9ebhoT4eIfdFmsy8rZFPaxO5w1GHrX2Jj5 qF5VvfLgErS2PXNpwTQ0Gk/A= X-Received: by 2002:a1f:2f4c:: with SMTP id v73mr4518874vkv.12.1584003604870; Thu, 12 Mar 2020 02:00:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvE2VU1Xh021JyMuIrr+9nrUSU8fMauuAx/e25ElBdG6ba6dMEaiNISGKFHu1cXEJyGU4ZRwkaPsKrzd91eGnY= X-Received: by 2002:a1f:2f4c:: with SMTP id v73mr4518863vkv.12.1584003604563; Thu, 12 Mar 2020 02:00:04 -0700 (PDT) MIME-Version: 1.0 References: <20200310133304.39951-1-harry.van.haaren@intel.com> <20200311143927.76021-1-harry.van.haaren@intel.com> In-Reply-To: From: David Marchand Date: Thu, 12 Mar 2020 09:59:53 +0100 Message-ID: To: "Van Haaren, Harry" Cc: dev , Aaron Conole , dpdk stable X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [PATCH v2] eal/service: fix exit by resetting service lcores 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" Hello, On Wed, Mar 11, 2020 at 5:21 PM Van Haaren, Harry wrote: > Issue was that service cores can remain running while main thread > has freed service-core memory, later racy return of service lcore > then causes use-after-free. > > This commit fixes it by > A) resetting all service cores to return > B) waiting for them to return > C) freeing memory > > I am confident in the fix. Ok. > > > a race-condition on 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: 21698354c832 ("service: introduce service cores concept") The race per se was introduced with: da23f0aa87d8 ("service: fix memory leak with new function") --=20 David Marchand