sys: FspSendQueryEaIrp: fix EA related BSOD

This commit is contained in:
Bill Zissimopoulos 2019-04-17 16:04:44 -07:00
parent 859d4250c3
commit a08fdccb17
2 changed files with 59 additions and 53 deletions

View File

@ -344,6 +344,7 @@ NTSTATUS FspSendQueryEaIrp(PDEVICE_OBJECT DeviceObject, PFILE_OBJECT FileObject,
IrpSp = IoGetNextIrpStackLocation(Irp);
Irp->RequestorMode = KernelMode;
Irp->AssociatedIrp.SystemBuffer = Ea;
Irp->UserBuffer = Ea;
IrpSp->MajorFunction = IRP_MJ_QUERY_EA;
IrpSp->FileObject = FileObject;
IrpSp->Parameters.QueryEa.Length = EaLength;

View File

@ -94,6 +94,10 @@ static void wsl_stat_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0);
ASSERT(INVALID_HANDLE_VALUE != Handle);
for (int repeat = 0; 2 > repeat; repeat++)
{
/* repeat this test to ensure that any caches are tested */
Result = NtQueryInformationFile(Handle, &IoStatus, &StatInfo, sizeof StatInfo,
68/*FileStatInformation*/);
if (STATUS_SUCCESS == Result)
@ -151,6 +155,7 @@ static void wsl_stat_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
STATUS_NOT_IMPLEMENTED == Result/* value returned under WOW64 */);
FspDebugLog(__FUNCTION__ ": only works in Win10 with WSLinux\n");
}
}
CloseHandle(Handle);