From: Jakub Jelinek <jakub@redhat.com>
To: Julian Brown <julian@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [PATCH 01/11] libgomp: Release device lock on cbuf error path
Date: Tue, 12 Oct 2021 11:23:22 +0200 [thread overview]
Message-ID: <20211012092322.GD304296@tucnak> (raw)
In-Reply-To: <ca035c65beec5c9b0c0fe30a61d4a792698580df.1633106212.git.julian@codesourcery.com>
On Fri, Oct 01, 2021 at 10:07:48AM -0700, Julian Brown wrote:
> This patch releases the device lock on a sanity-checking error path in
> transfer combining (cbuf) handling in libgomp:target.c. This shouldn't
> happen when handling well-formed mapping clauses, but erroneous clauses
> can currently cause a hang if the condition triggers.
>
> Tested with offloading to NVPTX. OK?
>
> 2021-09-29 Julian Brown <julian@codesourcery.com>
>
> libgomp/
> * target.c (gomp_copy_host2dev): Release device lock on cbuf
> error path.
Ok, thanks. This doesn't seem to depend on anything else, so
can be committed separately right away.
> diff --git a/libgomp/target.c b/libgomp/target.c
> index 65bb40100e5..84c6fdf2c47 100644
> --- a/libgomp/target.c
> +++ b/libgomp/target.c
> @@ -385,7 +385,10 @@ gomp_copy_host2dev (struct gomp_device_descr *devicep,
> else if (cbuf->chunks[middle].start <= doff)
> {
> if (doff + sz > cbuf->chunks[middle].end)
> - gomp_fatal ("internal libgomp cbuf error");
> + {
> + gomp_mutex_unlock (&devicep->lock);
> + gomp_fatal ("internal libgomp cbuf error");
> + }
> memcpy ((char *) cbuf->buf + (doff - cbuf->chunks[0].start),
> h, sz);
> return;
> --
> 2.29.2
Jakub
next prev parent reply other threads:[~2021-10-12 9:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 17:07 [PATCH 00/11] OpenMP: Deep struct dereferences Julian Brown
2021-10-01 17:07 ` [PATCH 01/11] libgomp: Release device lock on cbuf error path Julian Brown
2021-10-12 9:23 ` Jakub Jelinek [this message]
2021-10-01 17:07 ` [PATCH 02/11] Remove base_ind/base_ref handling from extract_base_bit_offset Julian Brown
2021-10-12 9:27 ` Jakub Jelinek
2021-10-01 17:07 ` [PATCH 03/11] OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by base pointer) Julian Brown
2021-10-01 17:07 ` [PATCH 04/11] Remove omp_target_reorder_clauses Julian Brown
2021-10-01 17:09 ` [PATCH 05/11] OpenMP/OpenACC: Hoist struct sibling list handling in gimplification Julian Brown
2021-10-01 17:16 ` Julian Brown
2021-10-01 17:09 ` [PATCH 06/11] OpenMP: Allow array ref components for C & C++ Julian Brown
2021-10-01 17:09 ` [PATCH 07/11] OpenMP: Fix non-zero attach/detach bias for struct dereferences Julian Brown
2021-10-11 14:49 ` Julian Brown
2021-10-01 17:09 ` [PATCH 08/11] Not for committing: noisy topological sorting output Julian Brown
2021-10-01 17:09 ` [PATCH 09/11] Not for committing: noisy sibling-list handling output Julian Brown
2021-10-01 17:10 ` [PATCH 10/11] Not for committing: noisy mapping-group taxonomy Julian Brown
2021-10-01 17:10 ` [PATCH 11/11] OpenMP/OpenACC: [WIP] Add gcc_unreachable to apparently-dead path in build_struct_comp_nodes Julian Brown
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=20211012092322.GD304296@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=julian@codesourcery.com \
--cc=thomas@codesourcery.com \
/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).