Fix IRP_MJ_QUERY_INFORMATION/FileStandardInformation (current code was trying to...
authorHervé Poussineau <hpoussin@reactos.org>
Wed, 24 Aug 2005 15:37:04 +0000 (15:37 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Wed, 24 Aug 2005 15:37:04 +0000 (15:37 +0000)
Replace MmGetSystemAddressForMdl by MmGetSystemAddressForMdlSafe

svn path=/trunk/; revision=17514

reactos/drivers/dd/serial/devctrl.c
reactos/drivers/dd/serial/info.c
reactos/drivers/dd/serial/pnp.c

index 3034b12..910e347 100644 (file)
@@ -31,7 +31,7 @@ SerialGetUserBuffers(
                case METHOD_IN_DIRECT:
                case METHOD_OUT_DIRECT:
                        *BufferIn = Irp->AssociatedIrp.SystemBuffer;
-                       *BufferOut = MmGetSystemAddressForMdl(Irp->MdlAddress);
+                       *BufferOut = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority);
                        break;
                case METHOD_NEITHER:
                        *BufferIn = IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.Type3InputBuffer;
index 9443f81..e3f7f15 100644 (file)
@@ -38,6 +38,7 @@ SerialQueryInformation(
                                Status = STATUS_BUFFER_OVERFLOW;
                        else if (!StandardInfo)
                                Status = STATUS_INVALID_PARAMETER;
+                       else
                        {
                                StandardInfo->AllocationSize.QuadPart = 0;
                                StandardInfo->EndOfFile.QuadPart = 0;
index 6729a21..6ca35ef 100644 (file)
@@ -274,7 +274,7 @@ SerialPnpStartDevice(
        if (NT_SUCCESS(Status))
        {
                /* Key = \Device\Serialx, Value = COMx */
-               ZwSetValueKey(hKey, &DeviceName, 0, REG_SZ, &ComPortBuffer, ComPort.Length + sizeof(WCHAR));
+               ZwSetValueKey(hKey, &DeviceName, 0, REG_SZ, ComPortBuffer, ComPort.Length + sizeof(WCHAR));
                ZwClose(hKey);
        }