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 685EFA0C44 for ; Mon, 12 Apr 2021 12:08:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 101CD1410D9; Mon, 12 Apr 2021 12:08:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 644CC141096 for ; Mon, 12 Apr 2021 12:08:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618222087; 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: in-reply-to:in-reply-to:references:references; bh=AVzEj8lmotXz6k6tOhMR6gWG3gzhoejIgbh/xLv/cW8=; b=fVus++AG3Vk+GaQxMi8UBzUp/iQJkrK8wJpPh9y0eb2JW2xwx4SJ/aKqdOdjajAzSSZol8 xaGV1qg9GIsdESP32DQr3KZ1eSODZhgjmAJ3jhIwqTMTILN9mnxFT/UXFP5uzwgtaOpaP6 GE4T2Jd2FqYoUXVe1XMh0LkAgEWriUo= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-357-pyC1R9X7Mt6wX7qCz9roCw-1; Mon, 12 Apr 2021 06:08:04 -0400 X-MC-Unique: pyC1R9X7Mt6wX7qCz9roCw-1 Received: by mail-vs1-f71.google.com with SMTP id u9so683965vsg.16 for ; Mon, 12 Apr 2021 03:08:04 -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=AVzEj8lmotXz6k6tOhMR6gWG3gzhoejIgbh/xLv/cW8=; b=pn9Y4eaM6OCl8P5GOmrgRt6TEDQTtClXJamqQ127sC1cC0JulL0ye/G7ZKpFuN7MmV fwZVmzdDi9lDGWobws982qm/JdeRtIQt5FOIGI9kBfsDVQq6soQw+0isK6vCC4ZYrwbx wNpTmZoRsjBDFxFQMp9iwx3vULGGH8AGmnqrEIJtgxi5i3MwUjv1Wj290CzMjA2GoBWR udY6daPy9f6jURQJ1quJ9eu4Shei64uv/GWZSxcO4XqnduUR7WdtBr/WxqZEFCKl5yDY fG0pty70/KOAS+3gD+uunOn9zHl0j3Kn3BkCCVc8e2ViR8VGDKQZlzCc42hRSw5AbFKy 9mBg== X-Gm-Message-State: AOAM532si4TSvQxYVld6/lgBVfRXWYrFyltWvUXX2OAjeQ8Jctd5IeQF iPcIGz5FuL+3ZzDr5uTs28Mp0QN6s6M4Bjdwbn816J1Pq8bioB2z8szowe96kyEfyD0vV/qzEQn GrwPrA1KH4Zpox1H7zzBgpZk= X-Received: by 2002:a67:efd4:: with SMTP id s20mr16611574vsp.27.1618222083606; Mon, 12 Apr 2021 03:08:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+H9I2iW7C5lIn7cfwZHlyvFUPrfvuR/T8fr19GKdja+7gNwrqNWGNR+Mr0Hfvv6iAf/8rAVfycvZMbNF3Amw= X-Received: by 2002:a67:efd4:: with SMTP id s20mr16611560vsp.27.1618222083401; Mon, 12 Apr 2021 03:08:03 -0700 (PDT) MIME-Version: 1.0 References: <20210410195433.13416-1-talshn@nvidia.com> In-Reply-To: <20210410195433.13416-1-talshn@nvidia.com> From: David Marchand Date: Mon, 12 Apr 2021 12:07:52 +0200 Message-ID: To: Tal Shnaiderman Cc: dev , Thomas Monjalon , Pallavi Kadam , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , "Dmitry Malloy (MESHCHANINOV)" , Luc Pelletier , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] eal/windows: fix pthreads macros return values 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 Sender: "stable" On Sat, Apr 10, 2021 at 9:55 PM Tal Shnaiderman wrote: > > The macro definitions of the following pthread functions > return incorrect values from the inner function return code. > > while pthread_barrier_init, pthread_barrier_destroy and > pthread_cancel return 0 in a case of success and non zero (errno) value > otherwise the shimming functions InitializeSynchronizationBarrier, > DeleteSynchronizationBarrier and TerminateThread return FALSE (0) > in a case of failure and TRUE(1) in a case of success. > > This issue was undetected as none of the functions return codes was > checked until such check was added in commit 34cc55cce6b1 ("eal: fix > race in control thread creation") exposing the issue by failing > pthread_barrier_init and rte_eal_init on Windows as a result. > > The fix aligned the return value of the 3 function with the expected > pthread API return values. > > Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros") > Fixes: 34cc55cce6b1 ("eal: fix race in control thread creation") Only the first Fixes: makes sense. The second commit you refer to relies on a working pthread implementation. -- David Marchand