sys: hardcode AlwaysUseDoubleBuffering for Reads

This commit is contained in:
Bill Zissimopoulos
2017-02-25 11:22:22 -08:00
parent 6774c34422
commit 4c0386bf8d
2 changed files with 12 additions and 4 deletions

View File

@ -171,6 +171,16 @@ static NTSTATUS FspVolumeCreateNoLock(
}
VolumeParams.FileSystemName[sizeof VolumeParams.FileSystemName / sizeof(WCHAR) - 1] = L'\0';
#if !DBG
/*
* In Release builds we hardcode AlwaysUseDoubleBuffering for Reads as we do not want someone
* to use WinFsp to crash Windows.
*
* See http://www.osronline.com/showthread.cfm?link=282037
*/
VolumeParams.AlwaysUseDoubleBuffering = 1;
#endif
/* create volume guid */
Result = FspCreateGuid(&Guid);
if (!NT_SUCCESS(Result))