public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] Cygwin: path: remove unnecessary release_write.
@ 2023-10-24 17:43 tryandbuy
  0 siblings, 0 replies; only message in thread
From: tryandbuy @ 2023-10-24 17:43 UTC (permalink / raw)
  To: cygwin-patches

Fix an old bug that only appeared after replacing muto with SRWLOCK.

The bug leads to a deadlock under certain conditions:
https://cygwin.com/pipermail/cygwin/2023-October/254604.html
---
 winsup/cygwin/path.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 1c3583d76..7165aa8b7 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -4868,7 +4868,6 @@ cwdstuff::set (path_conv *nat_cwd, const char *posix_cwd)
 			peb.ProcessParameters->CurrentDirectoryHandle,
 			GetCurrentProcess (), &h, 0, TRUE, 0))
 	    {
-	      release_write ();
 	      if (peb.ProcessParameters->CurrentDirectoryHandle)
 		debug_printf ("...and DuplicateHandle failed with %E.");
 	      dir = NULL;
-- 
2.42.0.windows.2


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

only message in thread, other threads:[~2023-10-24 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24 17:43 [PATCH] Cygwin: path: remove unnecessary release_write tryandbuy

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