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 45856A00C2 for ; Tue, 1 Nov 2022 15:53:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10D0540693; Tue, 1 Nov 2022 15:53:25 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4D7F840223 for ; Tue, 1 Nov 2022 15:53:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667314402; 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=f0MLpy+5VFP26N/WL/LFm/N9Qo3si1wFfRA8YZrEAAQ=; b=PJQg+gAlg0MIfg3X+0Y7cALtz8n0iNSMYKzUvURUxQwkT8EefAkAZnhewOYxgMmUO63n88 UdhSFvAu9oyulKzbDFzUultCzRhdKuhtm+z2FB3DpGEQUs3RtOI5zsktdktdzF7SL9l3tr L06GInff5BJkqnRL4ZpP9DLKtXAelEA= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-173-MxWnR3SOMkaQH128Z7Ma7A-1; Tue, 01 Nov 2022 10:53:21 -0400 X-MC-Unique: MxWnR3SOMkaQH128Z7Ma7A-1 Received: by mail-wr1-f70.google.com with SMTP id j20-20020adfb314000000b002366d9f67aaso3846869wrd.3 for ; Tue, 01 Nov 2022 07:53:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f0MLpy+5VFP26N/WL/LFm/N9Qo3si1wFfRA8YZrEAAQ=; b=EHCs4CSQYJDCM65s5LNM3rfDXRVoiUrn4YD/o6QDLBr/i+vBuDIkvjmKvh/bfTlb+4 Wi1kbZHdAZna28/0ni3eXbZ50/0l+7GxF1U2UvLUz8Uq8Fbgxny3tDT8u0Lcfg4svMtO 6TDCLFdiYJ9WD3MwES3R+0y/pgxzA9KH94R/us6pniJsb+avrlzyuEC/OmKqgHurQY8R 3v1C7roFqxM6EdTv3YkSQfY/7OqB1ATiOnHxlsL/GFDRRtAtjbeSc27Hs5NKhyhdB6Zp 8W3NOPOig+XRpaLBcGigWwjUAcZc1gTjMP+oJG4ekQ5AEXSZahFyU//I28Kza/lAaDiR J93w== X-Gm-Message-State: ACrzQf0qVZoF7x7BYrXcWxauQriADm2kGqeVj67z+zDn9PNr4/4kP/6o UKTC8AOH/RPLkUTkRQsv2qso1wk+NfIrcukmx4S6LjbuGQ9ORM5eTTkTlEL623MUvR2I1lBEjKb bE+HvOBA= X-Received: by 2002:a5d:6d42:0:b0:236:c9a6:5523 with SMTP id k2-20020a5d6d42000000b00236c9a65523mr7359116wri.222.1667314400392; Tue, 01 Nov 2022 07:53:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sYLtu5IBM9VDBcsdKVS1524xrdLlsrKg1N/tpbj7i9px6fhrj6jEUvkF8vVo0BhahtbrNng== X-Received: by 2002:a5d:6d42:0:b0:236:c9a6:5523 with SMTP id k2-20020a5d6d42000000b00236c9a65523mr7359113wri.222.1667314400237; Tue, 01 Nov 2022 07:53:20 -0700 (PDT) Received: from [192.168.0.36] ([78.17.179.245]) by smtp.gmail.com with ESMTPSA id bx7-20020a5d5b07000000b00228cbac7a25sm10356414wrb.64.2022.11.01.07.53.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 07:53:19 -0700 (PDT) Message-ID: <1b949edd-6eed-e5f6-1fb1-5284a8d555e6@redhat.com> Date: Tue, 1 Nov 2022 14:53:19 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 To: Erik Gabriel Carrillo , stable@dpdk.org Cc: harry.van.haaren@intel.com References: <20221026201442.3062175-1-erik.g.carrillo@intel.com> From: Kevin Traynor Subject: Re: [PATCH 21.11] service: fix early move to inactive status In-Reply-To: <20221026201442.3062175-1-erik.g.carrillo@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 On 26/10/2022 21:14, Erik Gabriel Carrillo wrote: > [ upstream commit 329280c53e6d09002b67e4d052fe27a952bd19cf ] > > Assume thread T2 is a service lcore that is in the middle of executing > a service function. Also, assume thread T1 concurrently calls > rte_service_lcore_stop(), which will set the "service_active_on_lcore" > state to false. If thread T1 then calls rte_service_may_be_active(), > it can return zero even though T2 is still running the service function. > If T1 then proceeds to free data being used by T2, a crash can ensue. > > Move the logic that clears the "service_active_on_lcore" state from the > rte_service_lcore_stop() function to the service_runner_func() to > ensure that we: > - don't let the "service_active_on_lcore" state linger as 1 > - don't clear the state early > > Fixes: 6550113be62d ("service: fix lingering active status") > Acked-by: Harry van Haaren > > Signed-off-by: Erik Gabriel Carrillo > --- > lib/eal/common/rte_service.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > Thanks for rebasing, applied.