From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by sourceware.org (Postfix) with ESMTPS id C1A58383D03E for ; Wed, 2 Jun 2021 13:39:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C1A58383D03E Received: by mail-qt1-x82c.google.com with SMTP id v4so1829486qtp.1 for ; Wed, 02 Jun 2021 06:39:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9eDNrgm51/+KufzFG1cEXMG5Y042NOpmJG16jB1aslc=; b=Hljvvk/Z3Go9NCod7ZYGhrQb6rQW7qAguhxZtICGzmwUJ1MsiGupK2r8A3R9Rdgd3B kUY1wa/xg/G0aQYzH11pq787E/GXoe0GGJK7PzulkWb5i8rtRYKrdkVRSDx7TyGYLcKa F/VvIB/QQw3eiWpkls82utoWmaaxasFMrL0qzw0DaVaEAdhUns0gl1BwGgAOLA7XXrwU MLgYZPqgl+8YdZhuqvvj0CIIU22CNFLz2VzZV6N5f0fcsF1AZqIDRYX/nZWSh4g6tXrB lOFW6fpjlfviuA9sr3yRjiaZctGMBr+VQZwllP6QifDrQmF9oVHZ7jed0rMgPAMnaZPb ENMg== X-Gm-Message-State: AOAM531MNJsIhFk5eW/nGkhE/aN14QDHw3RtUcqEvWpfZs3LGgxGhRtB SLIJCgNJWYO0vdzHFfqVt4CWAeTFqjBigQ== X-Google-Smtp-Source: ABdhPJzqnchK9F4+yEQfyIxkP76kdS7jqAPN5A/SPASpCU+iYk64383Z06b1h+brsNEtcZs0AOnIYw== X-Received: by 2002:ac8:149a:: with SMTP id l26mr24520367qtj.297.1622641186188; Wed, 02 Jun 2021 06:39:46 -0700 (PDT) Received: from [192.168.1.4] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id n194sm13450763qka.66.2021.06.02.06.39.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Jun 2021 06:39:45 -0700 (PDT) Subject: Re: [PATCH v3] nptl: Deallocate the thread stack on setup failure (BZ #19511) To: Andreas Schwab , Adhemerval Zanella via Libc-alpha References: <20210527172823.3461314-3-adhemerval.zanella@linaro.org> <20210602125644.3725112-1-adhemerval.zanella@linaro.org> <87r1hkjtwj.fsf@igel.home> From: Adhemerval Zanella Message-ID: <4e623fa1-419e-5c54-2da3-61a2c3f143ed@linaro.org> Date: Wed, 2 Jun 2021 10:39:43 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87r1hkjtwj.fsf@igel.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2021 13:39:57 -0000 On 02/06/2021 10:08, Andreas Schwab wrote: > On Jun 02 2021, Adhemerval Zanella via Libc-alpha wrote: > >> diff --git a/nptl/descr.h b/nptl/descr.h >> index 3de9535449..9d8297b45f 100644 >> --- a/nptl/descr.h >> +++ b/nptl/descr.h >> @@ -340,8 +340,9 @@ struct pthread >> /* True if thread must stop at startup time. */ >> bool stopped_start; >> >> - /* Formerly used for dealing with cancellation. */ >> - int parent_cancelhandling_unsed; >> + /* Indicate that a thread creation setup has failed (for instance the >> + scheduler or affinity). */ >> + int setup_failed; > > Perhaps this should be turned into a bitfield? I do not want to change the 'struct parent' layout or size with this patch. I discussed briefly with Florian on another thread and maybe we can cleanup the struct pthread, there are a couple of unused fields and others that can use a better type.