mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
sys: FspSendQueryEaIrp: fix EA related BSOD
This commit is contained in:
parent
859d4250c3
commit
a08fdccb17
@ -344,6 +344,7 @@ NTSTATUS FspSendQueryEaIrp(PDEVICE_OBJECT DeviceObject, PFILE_OBJECT FileObject,
|
|||||||
IrpSp = IoGetNextIrpStackLocation(Irp);
|
IrpSp = IoGetNextIrpStackLocation(Irp);
|
||||||
Irp->RequestorMode = KernelMode;
|
Irp->RequestorMode = KernelMode;
|
||||||
Irp->AssociatedIrp.SystemBuffer = Ea;
|
Irp->AssociatedIrp.SystemBuffer = Ea;
|
||||||
|
Irp->UserBuffer = Ea;
|
||||||
IrpSp->MajorFunction = IRP_MJ_QUERY_EA;
|
IrpSp->MajorFunction = IRP_MJ_QUERY_EA;
|
||||||
IrpSp->FileObject = FileObject;
|
IrpSp->FileObject = FileObject;
|
||||||
IrpSp->Parameters.QueryEa.Length = EaLength;
|
IrpSp->Parameters.QueryEa.Length = EaLength;
|
||||||
|
@ -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);
|
CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0);
|
||||||
ASSERT(INVALID_HANDLE_VALUE != Handle);
|
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,
|
Result = NtQueryInformationFile(Handle, &IoStatus, &StatInfo, sizeof StatInfo,
|
||||||
68/*FileStatInformation*/);
|
68/*FileStatInformation*/);
|
||||||
if (STATUS_SUCCESS == Result)
|
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 */);
|
STATUS_NOT_IMPLEMENTED == Result/* value returned under WOW64 */);
|
||||||
FspDebugLog(__FUNCTION__ ": only works in Win10 with WSLinux\n");
|
FspDebugLog(__FUNCTION__ ": only works in Win10 with WSLinux\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CloseHandle(Handle);
|
CloseHandle(Handle);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user