From: Mathieu Desnoyers via lttng-dev <lttng-dev@lists.lttng.org>
To: Eric Wong <normalperson@yhbt.net>, lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] [PATCH] always check pthread_create for failures
Date: Mon, 3 Oct 2022 10:41:29 -0400 [thread overview]
Message-ID: <f2f8bc4a-c788-bab2-433a-546ca5459d4d@efficios.com> (raw)
In-Reply-To: <20221002161343.854582-1-normalperson@yhbt.net>
On 2022-10-02 12:13, Eric Wong via lttng-dev wrote:
> pthread_create may fail with EAGAIN (which is no fault of the
> programmer), so don't allow the check to be compiled out.
Merged into master, stable-0.13, stable-0.12, thanks!
Mathieu
>
> Signed-off-by: Eric Wong <normalperson@yhbt.net>
> ---
> src/urcu-defer-impl.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/urcu-defer-impl.h b/src/urcu-defer-impl.h
> index 1c96287..cbb0ca8 100644
> --- a/src/urcu-defer-impl.h
> +++ b/src/urcu-defer-impl.h
> @@ -417,7 +417,8 @@ static void start_defer_thread(void)
> urcu_posix_assert(!ret);
>
> ret = pthread_create(&tid_defer, NULL, thr_defer, NULL);
> - urcu_posix_assert(!ret);
> + if (ret)
> + urcu_die(ret);
>
> ret = pthread_sigmask(SIG_SETMASK, &oldmask, NULL);
> urcu_posix_assert(!ret);
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
prev parent reply other threads:[~2022-10-03 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 16:13 [lttng-dev] [PATCH] always check pthread_create for failures Eric Wong via lttng-dev
2022-10-03 14:41 ` Mathieu Desnoyers via lttng-dev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2f8bc4a-c788-bab2-433a-546ca5459d4d@efficios.com \
--to=lttng-dev@lists.lttng.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).