From 7b26c74d54495155c5903617ad43d47a5c28adf7 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 Sep 2014 17:34:05 +0200 Subject: [PATCH] Added patch to fix issues when driver dispatch routine returns different status codes. --- README.md | 3 +- debian/changelog | 1 + patches/Makefile | 19 ++++++++++ ...issues-when-driver-returns-two-diffe.patch | 37 +++++++++++++++++++ patches/ntoskrnl-Irp_Status/definition | 4 ++ 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 patches/ntoskrnl-Irp_Status/0001-ntoskrnl-Handle-issues-when-driver-returns-two-diffe.patch create mode 100644 patches/ntoskrnl-Irp_Status/definition diff --git a/README.md b/README.md index ac22e482..3b675c97 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,9 @@ Wine. All those differences are also documented on the Included bugfixes and improvements ================================== -**Bugfixes and features included in the next upcoming release [3]:** +**Bugfixes and features included in the next upcoming release [4]:** +* Fix issues when driver dispatch routine returns different status codes ([Wine Bug #30155](http://bugs.winehq.org/show_bug.cgi?id=30155)) * Send WM_PAINT event during dialog creation ([Wine Bug #35652](http://bugs.winehq.org/show_bug.cgi?id=35652)) * Support for FIND_FIRST_EX_CASE_SENSITIVE flag in FindFirstFileExW * Update a XIM candidate position when cursor location changes ([Wine Bug #30938](http://bugs.winehq.org/show_bug.cgi?id=30938)) diff --git a/debian/changelog b/debian/changelog index 07c9f750..8fc1b8c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ wine-compholio (1.7.28) UNRELEASED; urgency=low * Added patch to fix winemenubuilder desktop icon wine path (when using multiple wine versions). * Added patch to support FIND_FIRST_EX_CASE_SENSITIVE flag in FindFirstFileExW. * Added patch to send WM_PAINT event during dialog creation. + * Added patch to fix issues when driver dispatch routine returns different status codes. -- Sebastian Lackner Sun, 21 Sep 2014 01:44:14 +0200 wine-compholio (1.7.27) unstable; urgency=low diff --git a/patches/Makefile b/patches/Makefile index e58fa20b..9f63de86 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -48,6 +48,7 @@ PATCHLIST := \ ntdll-Junction_Points.ok \ ntdll-Pipe_SpecialCharacters.ok \ ntdll-loader_EntryPoint.ok \ + ntoskrnl-Irp_Status.ok \ quartz-MediaSeeking_Positions.ok \ riched20-IText_Interface.ok \ server-ACL_Compat.ok \ @@ -699,6 +700,24 @@ ntdll-loader_EntryPoint.ok: echo '+ { "ntdll-loader_EntryPoint", "Sebastian Lackner", "Set ldr.EntryPoint for main executable." },'; \ ) > ntdll-loader_EntryPoint.ok +# Patchset ntoskrnl-Irp_Status +# | +# | Included patches: +# | * Handle issues when driver returns two different status codes from dispatcher. [by Sebastian Lackner] +# | +# | This patchset fixes the following Wine bugs: +# | * [#30155] Fix issues when driver dispatch routine returns different status codes +# | +# | Modified files: +# | * dlls/ntoskrnl.exe/ntoskrnl.c +# | +.INTERMEDIATE: ntoskrnl-Irp_Status.ok +ntoskrnl-Irp_Status.ok: + $(call APPLY_FILE,ntoskrnl-Irp_Status/0001-ntoskrnl-Handle-issues-when-driver-returns-two-diffe.patch) + @( \ + echo '+ { "ntoskrnl-Irp_Status", "Sebastian Lackner", "Handle issues when driver returns two different status codes from dispatcher." },'; \ + ) > ntoskrnl-Irp_Status.ok + # Patchset quartz-MediaSeeking_Positions # | # | Included patches: diff --git a/patches/ntoskrnl-Irp_Status/0001-ntoskrnl-Handle-issues-when-driver-returns-two-diffe.patch b/patches/ntoskrnl-Irp_Status/0001-ntoskrnl-Handle-issues-when-driver-returns-two-diffe.patch new file mode 100644 index 00000000..eccc4da2 --- /dev/null +++ b/patches/ntoskrnl-Irp_Status/0001-ntoskrnl-Handle-issues-when-driver-returns-two-diffe.patch @@ -0,0 +1,37 @@ +From 5b309642c101ce36019023aea84fdb6c0d82fc6c Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sun, 28 Sep 2014 17:29:07 +0200 +Subject: ntoskrnl: Handle issues when driver returns two different status + codes from dispatcher. + +--- + dlls/ntoskrnl.exe/ntoskrnl.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c +index 17a0d39..73e12b9 100644 +--- a/dlls/ntoskrnl.exe/ntoskrnl.c ++++ b/dlls/ntoskrnl.exe/ntoskrnl.c +@@ -195,6 +195,19 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, + DPRINTF( "%04x:Ret driver dispatch %p (device=%p,irp=%p) retval=%08x\n", + GetCurrentThreadId(), dispatch, device, &irp, status ); + ++ /* Ensure returned status code is consistent */ ++ if (status == STATUS_PENDING) ++ { ++ FIXME( "driver returned status=STATUS_PENDING, irp.IoStatus.u.Status=%08x\n", ++ irp.IoStatus.u.Status ); ++ } ++ else if (irp.IoStatus.u.Status != status) ++ { ++ FIXME( "driver returned status=%08x != irp.IoStatus.u.Status=%08x\n", ++ status, irp.IoStatus.u.Status ); ++ irp.IoStatus.u.Status = status; ++ } ++ + *out_size = (irp.IoStatus.u.Status >= 0) ? irp.IoStatus.Information : 0; + if ((code & 3) == METHOD_BUFFERED) + { +-- +2.1.1 + diff --git a/patches/ntoskrnl-Irp_Status/definition b/patches/ntoskrnl-Irp_Status/definition new file mode 100644 index 00000000..f236cfe1 --- /dev/null +++ b/patches/ntoskrnl-Irp_Status/definition @@ -0,0 +1,4 @@ +Author: Sebastian Lackner +Subject: Handle issues when driver returns two different status codes from dispatcher. +Revision: 1 +Fixes: [30155] Fix issues when driver dispatch routine returns different status codes