[PATCH 1/2] msvcrt: Do not acquire fd lock in msvcrt_create_io_inherit_block. (resend)

Thomas Faber thomas.faber at reactos.org
Fri Nov 12 07:39:45 CST 2021


Apologies, my user agent apparently messed this one up somehow.
-------------- next part --------------
From fe49c0c8ea4e259a9c5419269cbfd107896f935e Mon Sep 17 00:00:00 2001
From: Doug Lyons <douglyons at douglyons.com>
Date: Thu, 11 Nov 2021 17:32:45 -0500
Subject: msvcrt: Do not acquire fd lock in msvcrt_create_io_inherit_block.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51647
Signed-off-by: Doug Lyons <douglyons at douglyons.com>
Signed-off-by: Thomas Faber <thomas.faber at reactos.org>
---
 dlls/msvcrt/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index fd7168991f4..e954460ea9a 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -543,7 +543,7 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
   for (fd = 0; fd < last_fd; fd++)
   {
     /* to be inherited, we need it to be open, and that DONTINHERIT isn't set */
-    fdinfo = get_ioinfo(fd);
+    fdinfo = get_ioinfo_nolock(fd);
     if ((fdinfo->wxflag & (WX_OPEN | WX_DONTINHERIT)) == WX_OPEN)
     {
       *wxflag_ptr = fdinfo->wxflag;
@@ -554,7 +554,6 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
       *wxflag_ptr = 0;
       *handle_ptr = INVALID_HANDLE_VALUE;
     }
-    release_ioinfo(fdinfo);
     wxflag_ptr++; handle_ptr++;
   } 
   return TRUE;
-- 
2.31.1



More information about the wine-devel mailing list