From 2789fdcece0b3a64b1753b882df05097aeefdc91 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 15 Nov 2014 02:19:13 +0100 Subject: [PATCH] Added patch to close server fd if there is no space in thread inflight fd list. --- debian/changelog | 1 + patches/Makefile | 16 ++++++++++++ ...if-there-is-no-space-in-thread-infli.patch | 25 +++++++++++++++++++ patches/server-Fix_Leak/definition | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 patches/server-Fix_Leak/0001-server-Close-fd-if-there-is-no-space-in-thread-infli.patch create mode 100644 patches/server-Fix_Leak/definition diff --git a/debian/changelog b/debian/changelog index dfab05d7..f7b0eb9f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,7 @@ wine-compholio (1.7.31) UNRELEASED; urgency=low * Added patch to avoid sending window messages in FindWindowExW. * Added patch to fix handling of invert_y in DrawTextExW. * Added patch to fix implementation of K32GetPerformanceInfo. + * Added patch to close server fd if there is no space in thread inflight fd list. * Removed patch for iphlpapi stub functions (accepted upstream). * Removed patches for FindFirstFileExW (accepted upstream). * Removed patches for TLB dependencies lookup in resources (accepted upstream). diff --git a/patches/Makefile b/patches/Makefile index daafbd3a..d512a59f 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -80,6 +80,7 @@ PATCHLIST := \ server-ACL_Compat.ok \ server-Address_Change_Notification.ok \ server-CreateProcess_ACLs.ok \ + server-Fix_Leak.ok \ server-Inherited_ACLs.ok \ server-Misc_ACL.ok \ server-OpenProcess.ok \ @@ -1362,6 +1363,21 @@ server-CreateProcess_ACLs.ok: echo '+ { "server-CreateProcess_ACLs", "Joris van der Wel / Sebastian Lackner", "Implement passing ACLs to CreateProcess. [rev 2]" },'; \ ) > server-CreateProcess_ACLs.ok +# Patchset server-Fix_Leak +# | +# | Included patches: +# | * Close server fd if there is no space in thread inflight fd list. [by Sebastian Lackner] +# | +# | Modified files: +# | * server/thread.c +# | +.INTERMEDIATE: server-Fix_Leak.ok +server-Fix_Leak.ok: + $(call APPLY_FILE,server-Fix_Leak/0001-server-Close-fd-if-there-is-no-space-in-thread-infli.patch) + @( \ + echo '+ { "server-Fix_Leak", "Sebastian Lackner", "Close server fd if there is no space in thread inflight fd list." },'; \ + ) > server-Fix_Leak.ok + # Patchset server-Inherited_ACLs # | # | Included patches: diff --git a/patches/server-Fix_Leak/0001-server-Close-fd-if-there-is-no-space-in-thread-infli.patch b/patches/server-Fix_Leak/0001-server-Close-fd-if-there-is-no-space-in-thread-infli.patch new file mode 100644 index 00000000..20e5fb0d --- /dev/null +++ b/patches/server-Fix_Leak/0001-server-Close-fd-if-there-is-no-space-in-thread-infli.patch @@ -0,0 +1,25 @@ +From 3df51527f28634f01e0f4f3af284544885d98e99 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sat, 15 Nov 2014 01:04:29 +0100 +Subject: server: Close fd if there is no space in thread inflight fd list. + +--- + server/thread.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/server/thread.c b/server/thread.c +index 50d6940..97860ee 100644 +--- a/server/thread.c ++++ b/server/thread.c +@@ -1047,6 +1047,8 @@ int thread_add_inflight_fd( struct thread *thread, int client, int server ) + thread->inflight[i].server = server; + return i; + } ++ ++ close( server ); + return -1; + } + +-- +2.1.3 + diff --git a/patches/server-Fix_Leak/definition b/patches/server-Fix_Leak/definition new file mode 100644 index 00000000..7b78e9af --- /dev/null +++ b/patches/server-Fix_Leak/definition @@ -0,0 +1,3 @@ +Author: Sebastian Lackner +Subject: Close server fd if there is no space in thread inflight fd list. +Revision: 1