public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/personal-branch)] [OpenACC] Missing unlocking on error paths in attach/detach code, part II
@ 2020-06-10  3:36 Jiu Fu Guo
  0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2020-06-10  3:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2e24d457d8c97e409549848715ff046cfa9efd3d

commit 2e24d457d8c97e409549848715ff046cfa9efd3d
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Sat May 23 17:20:30 2020 +0200

    [OpenACC] Missing unlocking on error paths in attach/detach code, part II
    
            libgomp/
            * oacc-mem.c (goacc_exit_data_internal): Unlock on error path.

Diff:
---
 libgomp/oacc-mem.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c
index c06b7341cbb..6713846c942 100644
--- a/libgomp/oacc-mem.c
+++ b/libgomp/oacc-mem.c
@@ -1060,7 +1060,10 @@ goacc_exit_data_internal (struct gomp_device_descr *acc_dev, size_t mapnum,
 	      = splay_tree_lookup (&acc_dev->mem_map, &cur_node);
 
 	    if (n == NULL)
-	      gomp_fatal ("struct not mapped for detach operation");
+	      {
+		gomp_mutex_unlock (&acc_dev->lock);
+		gomp_fatal ("struct not mapped for detach operation");
+	      }
 
 	    gomp_detach_pointer (acc_dev, aq, n, hostaddr, finalize, NULL);
 	  }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-10  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10  3:36 [gcc(refs/users/guojiufu/heads/personal-branch)] [OpenACC] Missing unlocking on error paths in attach/detach code, part II Jiu Fu Guo

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).