ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
559 discussions
Start a n
N
ew thread
[cgutman] 55157: [USBSTOR] - Rewrite pending SRB handling and change some behavior of the IRP queue - The caller is no longer responsible for checking whether it can call USBSTOR_QueueNextRequest; ...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 24 23:04:31 2012 New Revision: 55157 URL:
http://svn.reactos.org/svn/reactos?rev=55157&view=rev
Log: [USBSTOR] - Rewrite pending SRB handling and change some behavior of the IRP queue - The caller is no longer responsible for checking whether it can call USBSTOR_QueueNextRequest; frozen IRP queue and pending SRB are both handled for them - It's no longer required for the caller of USBSTOR_QueueTerminateRequest to know whether the SRB was active (which was impossible before when handling a cancellation) - Many potential race issues with IRP cancellation are eliminated - Debugging hung SRBs is much easier now that pointer to the active one is stored in the FDO Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/error.c branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/error.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/error.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/error.c [iso-8859-1] Tue Jan 24 23:04:31 2012 @@ -129,10 +129,10 @@ /* Complete the master IRP */ Context->Irp->IoStatus.Status = Status; Context->Irp->IoStatus.Information = 0; + USBSTOR_QueueTerminateRequest(Context->PDODeviceExtension->LowerDeviceObject, Context->Irp); IoCompleteRequest(Context->Irp, IO_NO_INCREMENT); /* Start the next request */ - USBSTOR_QueueTerminateRequest(Context->PDODeviceExtension->LowerDeviceObject, TRUE); USBSTOR_QueueNextRequest(Context->PDODeviceExtension->LowerDeviceObject); /* Signal the context event */ Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] Tue Jan 24 23:04:31 2012 @@ -67,7 +67,13 @@ // // now cancel the irp // + USBSTOR_QueueTerminateRequest(DeviceObject, Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); + + // + // start the next one + // + USBSTOR_QueueNextRequest(DeviceObject); } VOID @@ -117,7 +123,13 @@ // // now cancel the irp // + USBSTOR_QueueTerminateRequest(DeviceObject, Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); + + // + // start the next one + // + USBSTOR_QueueNextRequest(DeviceObject); } BOOLEAN @@ -358,8 +370,14 @@ // // complete request // + USBSTOR_QueueTerminateRequest(DeviceObject, Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); + // + // start next one + // + USBSTOR_QueueNextRequest(DeviceObject); + // // acquire lock // @@ -375,10 +393,12 @@ VOID USBSTOR_QueueTerminateRequest( IN PDEVICE_OBJECT FDODeviceObject, - IN BOOLEAN ModifySrbState) + IN PIRP Irp) { KIRQL OldLevel; PFDO_DEVICE_EXTENSION FDODeviceExtension; + PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp); + PSCSI_REQUEST_BLOCK Request = (PSCSI_REQUEST_BLOCK)IoStack->Parameters.Others.Argument1; // // get FDO device extension @@ -400,17 +420,15 @@ // FDODeviceExtension->IrpPendingCount--; - if (ModifySrbState) - { - // - // sanity check - // - ASSERT(FDODeviceExtension->SrbActive == TRUE); - + // + // check if this was our current active SRB + // + if (FDODeviceExtension->ActiveSrb == Request) + { // // indicate processing is completed // - FDODeviceExtension->SrbActive = FALSE; + FDODeviceExtension->ActiveSrb = NULL; } // @@ -440,6 +458,18 @@ ASSERT(FDODeviceExtension->Common.IsFDO); // + // check first if there's already a request pending or the queue is frozen + // + if (FDODeviceExtension->ActiveSrb != NULL || + FDODeviceExtension->IrpListFreeze) + { + // + // no work to do yet + // + return; + } + + // // remove first irp from list // Irp = USBSTOR_RemoveIrp(DeviceObject); @@ -470,6 +500,11 @@ // sanity check // ASSERT(Request); + + // + // set the active SRB + // + FDODeviceExtension->ActiveSrb = Request; // // start next packet @@ -605,21 +640,19 @@ Irp->IoStatus.Information = 0; // + // terminate request + // + USBSTOR_QueueTerminateRequest(DeviceObject, Irp); + + // // complete request // IoCompleteRequest(Irp, IO_NO_INCREMENT); // - // check if the queue has been frozen - // - if (FDODeviceExtension->IrpListFreeze == FALSE) - { - // - // queue next request - // - USBSTOR_QueueTerminateRequest(DeviceObject, FALSE); - USBSTOR_QueueNextRequest(DeviceObject); - } + // queue next request + // + USBSTOR_QueueNextRequest(DeviceObject); // // done @@ -644,12 +677,6 @@ ASSERT(ResetInProgress == FALSE); // - // sanity check - // - ASSERT(FDODeviceExtension->SrbActive == FALSE); - FDODeviceExtension->SrbActive = TRUE; - - // // release lock // KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel); @@ -679,8 +706,8 @@ // Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_DEVICE_DOES_NOT_EXIST; + USBSTOR_QueueTerminateRequest(DeviceObject, Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); - USBSTOR_QueueTerminateRequest(DeviceObject, TRUE); return; } Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] Tue Jan 24 23:04:31 2012 @@ -282,14 +282,14 @@ Context->Irp->IoStatus.Information = Context->TransferDataLength; // + // terminate current request + // + USBSTOR_QueueTerminateRequest(Context->PDODeviceExtension->LowerDeviceObject, Context->Irp); + + // // complete request // IoCompleteRequest(Context->Irp, IO_NO_INCREMENT); - - // - // terminate current request - // - USBSTOR_QueueTerminateRequest(Context->PDODeviceExtension->LowerDeviceObject, TRUE); // // start next request @@ -840,6 +840,16 @@ PSCSI_REQUEST_BLOCK Request; // + // get PDO device extension + // + PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + // + // sanity check + // + ASSERT(PDODeviceExtension->Common.IsFDO == FALSE); + + // // get current stack location // IoStack = IoGetCurrentIrpStackLocation(Irp); @@ -853,22 +863,8 @@ Request->SrbStatus = SRB_STATUS_SUCCESS; Irp->IoStatus.Information = Request->DataTransferLength; Irp->IoStatus.Status = STATUS_SUCCESS; + USBSTOR_QueueTerminateRequest(PDODeviceExtension->LowerDeviceObject, Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); - - // - // get PDO device extension - // - PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - - // - // sanity check - // - ASSERT(PDODeviceExtension->Common.IsFDO == FALSE); - - // - // terminate current request - // - USBSTOR_QueueTerminateRequest(PDODeviceExtension->LowerDeviceObject, TRUE); // // start next request @@ -1204,12 +1200,8 @@ Request->SrbStatus = SRB_STATUS_SUCCESS; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = Request->DataTransferLength; + USBSTOR_QueueTerminateRequest(PDODeviceExtension->LowerDeviceObject, Irp); IoCompleteRequest(Irp, IO_NO_INCREMENT); - - // - // terminate current request - // - USBSTOR_QueueTerminateRequest(PDODeviceExtension->LowerDeviceObject, TRUE); // // start next request Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h [iso-8859-1] Tue Jan 24 23:04:31 2012 @@ -66,7 +66,7 @@ BOOLEAN IrpListFreeze; // if true the irp list is freezed BOOLEAN ResetInProgress; // if hard reset is in progress ULONG IrpPendingCount; // count of irp pending - BOOLEAN SrbActive; // debug field if srb is pending + PSCSI_REQUEST_BLOCK ActiveSrb; // stores the current active SRB }FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; typedef struct @@ -439,4 +439,4 @@ VOID USBSTOR_QueueTerminateRequest( IN PDEVICE_OBJECT DeviceObject, - IN BOOLEAN ModifySrbState); + IN PIRP Irp);
12 years, 11 months
1
0
0
0
[pschweitzer] 55156: [MOUNTMGR] Finally add the long awaited Mount Point Manager (aka mountmgr). It's not complete yet, but will do most of the job it's been designed for. What's missing is some do...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Jan 24 22:54:14 2012 New Revision: 55156 URL:
http://svn.reactos.org/svn/reactos?rev=55156&view=rev
Log: [MOUNTMGR] Finally add the long awaited Mount Point Manager (aka mountmgr). It's not complete yet, but will do most of the job it's been designed for. What's missing is some dos volumes handlers, complete database support (local - registry - is complete, remote - files - is not). It handles NTFS properties like reparse points. It also handles devices with drive letters and those without drive letters (by using their unique ID). Devices removal/arrival is detected through notifications (might be an issue). Some work will have to be done in storage stack to fully support it. Most of its IOCTL have been implemented (it's possible, for example, to notify a volume arrival through them, in case notifications don't work). There's still some work to do on it to have it complete and fully implemented. Enjoy! Added: branches/usb-bringup-trunk/drivers/filters/ branches/usb-bringup-trunk/drivers/filters/CMakeLists.txt (with props) branches/usb-bringup-trunk/drivers/filters/directory.rbuild (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/ branches/usb-bringup-trunk/drivers/filters/mountmgr/CMakeLists.txt (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/database.c (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/device.c (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/mntmgr.h (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/mountmgr.c (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/mountmgr.rbuild (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/mountmgr.rc (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/notify.c (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/point.c (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/symlink.c (with props) branches/usb-bringup-trunk/drivers/filters/mountmgr/uniqueid.c (with props) Modified: branches/usb-bringup-trunk/drivers/CMakeLists.txt branches/usb-bringup-trunk/drivers/drivers.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/usb-bringup-trunk/drivers/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/CMake…
Modified: branches/usb-bringup-trunk/drivers/drivers.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/drive…
Added: branches/usb-bringup-trunk/drivers/filters/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/database.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/device.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/mntmgr.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/mountmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/mountmgr.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/mountmgr.rc URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/notify.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/point.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/symlink.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
Added: branches/usb-bringup-trunk/drivers/filters/mountmgr/uniqueid.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/filte…
12 years, 11 months
1
0
0
0
[cgutman] 55155: [USBSTOR] - Fix broken IRP error handling and leaking memory
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 24 22:28:44 2012 New Revision: 55155 URL:
http://svn.reactos.org/svn/reactos?rev=55155&view=rev
Log: [USBSTOR] - Fix broken IRP error handling and leaking memory Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/error.c branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/error.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/error.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/error.c [iso-8859-1] Tue Jan 24 22:28:44 2012 @@ -22,14 +22,14 @@ // // allocate urb // - DPRINT1("Allocating URB\n"); + DPRINT1("Allocating URB\n"); Urb = (PURB)AllocateItem(NonPagedPool, sizeof(struct _URB_PIPE_REQUEST)); if (!Urb) { // // out of memory // - DPRINT1("OutofMemory!\n"); + DPRINT1("OutofMemory!\n"); return STATUS_INSUFFICIENT_RESOURCES; } @@ -43,7 +43,7 @@ // // send the request // - DPRINT1("Sending Request DeviceObject %x, Urb %x\n", DeviceObject, Urb); + DPRINT1("Sending Request DeviceObject %x, Urb %x\n", DeviceObject, Urb); Status = USBSTOR_SyncUrbRequest(DeviceObject, Urb); // @@ -59,19 +59,19 @@ NTSTATUS USBSTOR_HandleTransferError( - PDEVICE_OBJECT DeviceObject, - PIRP Irp, - PIRP_CONTEXT Context) + PDEVICE_OBJECT DeviceObject, + PIRP_CONTEXT Context) { - NTSTATUS Status; - PIO_STACK_LOCATION Stack; - USBD_PIPE_HANDLE PipeHandle; - PSCSI_REQUEST_BLOCK Request; + NTSTATUS Status; + PIO_STACK_LOCATION Stack; + USBD_PIPE_HANDLE PipeHandle; + PSCSI_REQUEST_BLOCK Request; + PCDB pCDB; - DPRINT1("Entered Handle Transfer Error\n"); - // - // Determine pipehandle - // + DPRINT1("Entered Handle Transfer Error\n"); + // + // Determine pipehandle + // if (Context->cbw->CommandBlock[0] == SCSIOP_WRITE) { // @@ -87,72 +87,93 @@ PipeHandle = Context->FDODeviceExtension->InterfaceInformation->Pipes[Context->FDODeviceExtension->BulkInPipeIndex].PipeHandle; } - switch (Context->Urb.UrbHeader.Status) - { - case USBD_STATUS_STALL_PID: - { - // - // First attempt to reset the pipe - // - DPRINT1("Resetting Pipe\n"); - Status = USBSTOR_ResetPipeWithHandle(DeviceObject, PipeHandle); - if (NT_SUCCESS(Status)) - { - Status = STATUS_SUCCESS; - break; - } + switch (Context->Urb.UrbHeader.Status) + { + case USBD_STATUS_STALL_PID: + { + // + // First attempt to reset the pipe + // + DPRINT1("Resetting Pipe\n"); + Status = USBSTOR_ResetPipeWithHandle(DeviceObject, PipeHandle); + if (NT_SUCCESS(Status)) + { + Status = STATUS_SUCCESS; + break; + } - DPRINT1("Failed to reset pipe %x\n", Status); + DPRINT1("Failed to reset pipe %x\n", Status); - // - // FIXME: Reset of pipe failed, attempt to reset port - // - - Status = STATUS_UNSUCCESSFUL; - break; - } - // - // FIXME: Handle more errors - // - default: - { - DPRINT1("Error not handled\n"); - Status = STATUS_UNSUCCESSFUL; - } - } + // + // FIXME: Reset of pipe failed, attempt to reset port + // + + Status = STATUS_UNSUCCESSFUL; + break; + } + // + // FIXME: Handle more errors + // + default: + { + DPRINT1("Error not handled\n"); + Status = STATUS_UNSUCCESSFUL; + } + } - if (Status != STATUS_SUCCESS) - { - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - } - else - { - Stack = IoGetCurrentIrpStackLocation(Context->Irp); - // - // Retry the operation - // - Request = (PSCSI_REQUEST_BLOCK)Stack->Parameters.Others.Argument1; - DPRINT1("Retrying\n"); - Status = USBSTOR_HandleExecuteSCSI(DeviceObject, Context->Irp); - } - - DPRINT1("USBSTOR_HandleTransferError returning with Status %x\n", Status); - return Status; + Stack = IoGetCurrentIrpStackLocation(Context->Irp); + Request = (PSCSI_REQUEST_BLOCK)Stack->Parameters.Others.Argument1; + pCDB = (PCDB)Request->Cdb; + if (Status != STATUS_SUCCESS) + { + /* Complete the master IRP */ + Context->Irp->IoStatus.Status = Status; + Context->Irp->IoStatus.Information = 0; + IoCompleteRequest(Context->Irp, IO_NO_INCREMENT); + + /* Start the next request */ + USBSTOR_QueueTerminateRequest(Context->PDODeviceExtension->LowerDeviceObject, TRUE); + USBSTOR_QueueNextRequest(Context->PDODeviceExtension->LowerDeviceObject); + + /* Signal the context event */ + if (Context->Event) + KeSetEvent(Context->Event, 0, FALSE); + + /* Cleanup the IRP context */ + if (pCDB->AsByte[0] == SCSIOP_READ_CAPACITY) + FreeItem(Context->TransferData); + FreeItem(Context->cbw); + FreeItem(Context); + } + else + { + + DPRINT1("Retrying\n"); + Status = USBSTOR_HandleExecuteSCSI(DeviceObject, Context->Irp); + + /* Cleanup the old IRP context */ + if (pCDB->AsByte[0] == SCSIOP_READ_CAPACITY) + FreeItem(Context->TransferData); + FreeItem(Context->cbw); + FreeItem(Context); + } + + DPRINT1("USBSTOR_HandleTransferError returning with Status %x\n", Status); + return Status; } VOID NTAPI ErrorHandlerWorkItemRoutine( - PVOID Context) + PVOID Context) { - NTSTATUS Status; - PERRORHANDLER_WORKITEM_DATA WorkItemData = (PERRORHANDLER_WORKITEM_DATA)Context; - - Status = USBSTOR_HandleTransferError(WorkItemData->DeviceObject, WorkItemData->Irp, WorkItemData->Context); + NTSTATUS Status; + PERRORHANDLER_WORKITEM_DATA WorkItemData = (PERRORHANDLER_WORKITEM_DATA)Context; + + Status = USBSTOR_HandleTransferError(WorkItemData->DeviceObject, WorkItemData->Context); - // - // Free Work Item Data - // - ExFreePool(WorkItemData); + // + // Free Work Item Data + // + ExFreePool(WorkItemData); } Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] Tue Jan 24 22:28:44 2012 @@ -181,18 +181,9 @@ { DPRINT1("Attempting Error Recovery\n"); // - // If a Read Capacity Request free TransferBuffer - // - if (pCDB->AsByte[0] == SCSIOP_READ_CAPACITY) - { - FreeItem(Context->TransferData); - } - - // - // Clean up the rest - // - FreeItem(Context->cbw); - FreeItem(Context); + // free the allocated irp + // + IoFreeIrp(Irp); // // Allocate Work Item Data @@ -213,7 +204,6 @@ ErrorHandlerWorkItemData); ErrorHandlerWorkItemData->DeviceObject = Context->FDODeviceExtension->FunctionalDeviceObject; - ErrorHandlerWorkItemData->Irp = Irp; ErrorHandlerWorkItemData->Context = Context; DPRINT1("Queuing WorkItemROutine\n"); ExQueueWorkItem(&ErrorHandlerWorkItemData->WorkQueueItem, DelayedWorkQueue); @@ -315,6 +305,10 @@ KeSetEvent(Context->Event, 0, FALSE); } + // + // free our allocated irp + // + IoFreeIrp(Irp); // // free context Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h [iso-8859-1] Tue Jan 24 22:28:44 2012 @@ -278,7 +278,6 @@ typedef struct _ERRORHANDLER_WORKITEM_DATA { PDEVICE_OBJECT DeviceObject; - PIRP Irp; PIRP_CONTEXT Context; WORK_QUEUE_ITEM WorkQueueItem; } ERRORHANDLER_WORKITEM_DATA, *PERRORHANDLER_WORKITEM_DATA;
12 years, 11 months
1
0
0
0
[cgutman] 55154: [USBEHCI/USBOHCI] - Handle invalid device handles gracefully instead of crashing
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 24 22:21:30 2012 New Revision: 55154 URL:
http://svn.reactos.org/svn/reactos?rev=55154&view=rev
Log: [USBEHCI/USBOHCI] - Handle invalid device handles gracefully instead of crashing Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hub_controller.cpp branches/usb-bringup-trunk/drivers/usb/usbohci/hub_controller.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] Tue Jan 24 22:21:30 2012 @@ -790,7 +790,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleIsochronousTransfer invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -847,7 +855,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleBulkOrInterruptTransfer invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1057,7 +1073,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleSelectConfiguration invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1099,7 +1123,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleSelectInterface invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1149,7 +1181,15 @@ // // check if this is a valid usb device handle // - ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleGetStatusFromDevice invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1205,7 +1245,15 @@ // // check if this is a valid usb device handle // - ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleClassDevice invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1311,7 +1359,15 @@ // // check if this is a valid usb device handle // - ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleGetDescriptorFromInterface invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1381,7 +1437,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleGetDescriptor invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1452,7 +1516,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("USB_CONFIGURATION_DESCRIPTOR_TYPE invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1503,7 +1575,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("USB_STRING_DESCRIPTOR_TYPE invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1557,7 +1637,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleClassEndpoint invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1621,7 +1709,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleClassInterface invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbohci/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbohci/hub_controller.cpp [iso-8859-1] Tue Jan 24 22:21:30 2012 @@ -790,7 +790,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleIsochronousTransfer invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -847,7 +855,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleBuldOrInterruptTransfer invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1057,7 +1073,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleSelectConfiguration invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1099,7 +1123,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleSelectInterface invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1149,7 +1181,15 @@ // // check if this is a valid usb device handle // - ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleGetStatusFromDevice invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1205,7 +1245,15 @@ // // check if this is a valid usb device handle // - ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("USB_REQUEST_GET_STATUS invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1311,7 +1359,15 @@ // // check if this is a valid usb device handle // - ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleGetDescriptorFromInterface invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1381,7 +1437,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleGetDescriptor invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1452,7 +1516,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("USB_CONFIGURATION_DESCRIPTOR_TYPE invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1494,11 +1566,18 @@ PC_ASSERT(Urb->UrbControlDescriptorRequest.TransferBuffer); PC_ASSERT(Urb->UrbControlDescriptorRequest.TransferBufferLength); - // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("USB_STRING_DESCRIPTOR_TYPE invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1552,7 +1631,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleClassEndpoint invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device @@ -1616,7 +1703,15 @@ // // check if this is a valid usb device handle // - PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + if (!ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))) + { + DPRINT1("HandleClassInterface invalid device handle %p\n", Urb->UrbHeader.UsbdDeviceHandle); + + // + // invalid device handle + // + return STATUS_DEVICE_NOT_CONNECTED; + } // // get device
12 years, 11 months
1
0
0
0
[tkreuzer] 55153: Fix build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Jan 24 21:56:02 2012 New Revision: 55153 URL:
http://svn.reactos.org/svn/reactos?rev=55153&view=rev
Log: Fix build Modified: trunk/reactos/include/ndk/extypes.h trunk/reactos/include/ndk/peb_teb.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/include/ndk/rtltypes.h trunk/reactos/lib/rtl/nls.c Modified: trunk/reactos/include/ndk/extypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Tue Jan 24 21:56:02 2012 @@ -772,7 +772,7 @@ ULONG TotalSystemCodePages; ULONG NonPagedPoolLookasideHits; ULONG PagedPoolLookasideHits; - ULONG AvailablePagedPoolPages; + ULONG Spare3Count; ULONG ResidentSystemCachePage; ULONG ResidentPagedPoolPage; ULONG ResidentSystemDriverPage; Modified: trunk/reactos/include/ndk/peb_teb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/peb_teb.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/peb_teb.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/peb_teb.h [iso-8859-1] Tue Jan 24 21:56:02 2012 @@ -146,7 +146,7 @@ PTR(PVOID*) FlsCallback; STRUCT(LIST_ENTRY) FlsListHead; PTR(PVOID) FlsBitmap; - ULONG FlsBitmapBits[FLS_MAXIMUM_AVAILABLE/(sizeof(ULONG)*8)]; + ULONG FlsBitmapBits[4]; // [FLS_MAXIMUM_AVAILABLE/(sizeof(ULONG)*8)]; ULONG FlsHighIndex; #endif #if (NTDDI_VERSION >= NTDDI_LONGHORN) Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Tue Jan 24 21:56:02 2012 @@ -964,7 +964,7 @@ NTAPI RtlWalkHeap( IN HANDLE HeapHandle, - IN OUT PRTL_HEAP_WALK_ENTRY HeapEntry + IN PVOID HeapEntry ); #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap) @@ -2663,14 +2663,6 @@ NTAPI RtlSetCurrentDirectory_U( IN PUNICODE_STRING name -); - -NTSYSAPI -NTSTATUS -NTAPI -RtlSetCurrentEnvironment( - IN PVOID Environment, - OUT OPTIONAL PVOID *PreviousEnvironment ); NTSYSAPI Modified: trunk/reactos/include/ndk/rtltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Tue Jan 24 21:56:02 2012 @@ -46,7 +46,7 @@ #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_1 0x200 #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_2 0x400 #define RTL_USER_PROCESS_PARAMETERS_PRIVATE_DLL_PATH 0x1000 -#define RTL_USER_PROCESS_PARAMETERS_APP_MANIFEST_PRESENT 0x2000 +#define RTL_USER_PROCESS_PARAMETERS_LOCAL_DLL_PATH 0x2000 #define RTL_USER_PROCESS_PARAMETERS_IMAGE_KEY_MISSING 0x4000 #define RTL_USER_PROCESS_PARAMETERS_NX 0x20000 @@ -978,6 +978,16 @@ } s2; } u; } RTL_HEAP_ENTRY, *PRTL_HEAP_ENTRY; + +typedef struct _RTL_HEAP_TAG +{ + ULONG NumberOfAllocations; + ULONG NumberOfFrees; + SIZE_T BytesAllocated; + USHORT TagIndex; + USHORT CreatorBackTraceIndex; + WCHAR TagName[24]; +} RTL_HEAP_TAG, *PRTL_HEAP_TAG; typedef struct _RTL_HEAP_INFORMATION { @@ -1262,8 +1272,8 @@ ULONG ExclusiveWaiters; LONG NumberActive; HANDLE OwningThread; - ULONG Flags; - PRTL_RESOURCE_DEBUG DebugInfo; + ULONG TimeoutBoost; + PVOID DebugInfo; } RTL_RESOURCE, *PRTL_RESOURCE; // Modified: trunk/reactos/lib/rtl/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/nls.c?rev=55153&r1…
============================================================================== --- trunk/reactos/lib/rtl/nls.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/nls.c [iso-8859-1] Tue Jan 24 21:56:02 2012 @@ -502,7 +502,7 @@ RtlUnicodeToMultiByteN (PCHAR MbString, ULONG MbSize, PULONG ResultSize, - PWCHAR UnicodeString, + PCWCH UnicodeString, ULONG UnicodeSize) { ULONG Size = 0;
12 years, 11 months
1
0
0
0
[cgutman] 55152: [USBSTOR] - Release the spinlock before returning (accidentally removed)
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 24 21:33:51 2012 New Revision: 55152 URL:
http://svn.reactos.org/svn/reactos?rev=55152&view=rev
Log: [USBSTOR] - Release the spinlock before returning (accidentally removed) Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] Tue Jan 24 21:33:51 2012 @@ -365,6 +365,11 @@ // KeAcquireSpinLock(&FDODeviceExtension->IrpListLock, &OldLevel); } + + // + // release lock + // + KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel); } VOID
12 years, 11 months
1
0
0
0
[tkreuzer] 55151: [NDK/DDK] - Improve/fix/update/add several function declarations and structures Patch by Samuel Serapion
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Jan 24 21:15:55 2012 New Revision: 55151 URL:
http://svn.reactos.org/svn/reactos?rev=55151&view=rev
Log: [NDK/DDK] - Improve/fix/update/add several function declarations and structures Patch by Samuel Serapion Modified: trunk/reactos/include/ddk/ntifs.h trunk/reactos/include/ndk/cmtypes.h trunk/reactos/include/ndk/extypes.h trunk/reactos/include/ndk/ldrtypes.h trunk/reactos/include/ndk/peb_teb.h trunk/reactos/include/ndk/pstypes.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/include/ndk/rtltypes.h trunk/reactos/include/xdk/rtlfuncs.h Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=55…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -1156,7 +1156,7 @@ _Out_writes_bytes_to_(MaxBytesInMultiByteString, *BytesInMultiByteString) PCHAR MultiByteString, _In_ ULONG MaxBytesInMultiByteString, _Out_opt_ PULONG BytesInMultiByteString, - _In_reads_bytes_(BytesInUnicodeString) PWCH UnicodeString, + _In_reads_bytes_(BytesInUnicodeString) PCWCH UnicodeString, _In_ ULONG BytesInUnicodeString); _IRQL_requires_max_(PASSIVE_LEVEL) Modified: trunk/reactos/include/ndk/cmtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cmtypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/cmtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/cmtypes.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -115,6 +115,8 @@ // #define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000 #define CM_RESOURCE_INTERRUPT_LATCHED 0x0001 +#define CM_RESOURCE_INTERRUPT_MESSAGE 0x0002 +#define CM_RESOURCE_INTERRUPT_POLICY_INCLUDED 0x0004 // // NtInitializeRegistry Flags @@ -136,7 +138,10 @@ KeyFullInformation, KeyNameInformation, KeyCachedInformation, - KeyFlagsInformation + KeyFlagsInformation, + KeyVirtualizationInformation, + KeyHandleTagsInformation, + MaxKeyInfoClass } KEY_INFORMATION_CLASS; typedef enum _KEY_VALUE_INFORMATION_CLASS @@ -145,7 +150,8 @@ KeyValueFullInformation, KeyValuePartialInformation, KeyValueFullInformationAlign64, - KeyValuePartialInformationAlign64 + KeyValuePartialInformationAlign64, + MaxKeyValueInfoClass } KEY_VALUE_INFORMATION_CLASS; typedef enum _KEY_SET_INFORMATION_CLASS { @@ -216,10 +222,44 @@ LARGE_INTEGER LastWriteTime; } KEY_WRITE_TIME_INFORMATION, *PKEY_WRITE_TIME_INFORMATION; +typedef struct _KEY_WOW64_FLAGS_INFORMATION +{ + ULONG UserFlags; +} KEY_WOW64_FLAGS_INFORMATION, *PKEY_WOW64_FLAGS_INFORMATION; + typedef struct _KEY_USER_FLAGS_INFORMATION { ULONG UserFlags; } KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION; + +typedef struct _KEY_HANDLE_TAGS_INFORMATION +{ + ULONG HandleTags; +} KEY_HANDLE_TAGS_INFORMATION, *PKEY_HANDLE_TAGS_INFORMATION; + +typedef struct _KEY_CONTROL_FLAGS_INFORMATION +{ + ULONG ControlFlags; +} KEY_CONTROL_FLAGS_INFORMATION, *PKEY_CONTROL_FLAGS_INFORMATION; + +typedef struct _KEY_VIRTUALIZATION_INFORMATION +{ + ULONG VirtualizationCandidate:1; + ULONG VirtualizationEnabled:1; + ULONG VirtualTarget:1; + ULONG VirtualStore:1; + ULONG VirtualSource:1; + ULONG Reserved:27; +} KEY_VIRTUALIZATION_INFORMATION, *PKEY_VIRTUALIZATION_INFORMATION; + +typedef struct _KEY_SET_VIRTUALIZATION_INFORMATION +{ + ULONG VirtualTarget:1; + ULONG VirtualStore:1; + ULONG VirtualSource:1; + ULONG Reserved:29; +} KEY_SET_VIRTUALIZATION_INFORMATION, *PKEY_SET_VIRTUALIZATION_INFORMATION; + typedef struct _KEY_FULL_INFORMATION { @@ -267,6 +307,13 @@ ULONG DataLength; UCHAR Data[1]; } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION; + +typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 +{ + ULONG Type; + ULONG DataLength; + UCHAR Data[1]; +} KEY_VALUE_PARTIAL_INFORMATION_ALIGN64, *PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64; typedef struct _KEY_VALUE_BASIC_INFORMATION { Modified: trunk/reactos/include/ndk/extypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -772,7 +772,7 @@ ULONG TotalSystemCodePages; ULONG NonPagedPoolLookasideHits; ULONG PagedPoolLookasideHits; - ULONG Spare3Count; + ULONG AvailablePagedPoolPages; ULONG ResidentSystemCachePage; ULONG ResidentPagedPoolPage; ULONG ResidentSystemDriverPage; @@ -849,9 +849,10 @@ { ULONG NextEntryOffset; ULONG NumberOfThreads; - LARGE_INTEGER SpareLi1; - LARGE_INTEGER SpareLi2; - LARGE_INTEGER SpareLi3; + LARGE_INTEGER WorkingSetPrivateSize; //VISTA + ULONG HardFaultCount; //WIN7 + ULONG NumberOfThreadsHighWatermark; //WIN7 + ULONGLONG CycleTime; //WIN7 LARGE_INTEGER CreateTime; LARGE_INTEGER UserTime; LARGE_INTEGER KernelTime; @@ -868,8 +869,8 @@ // NOTE: *NOT* THE SAME AS VM_COUNTERS! // SIZE_T PeakVirtualSize; - ULONG VirtualSize; - SIZE_T PageFaultCount; + SIZE_T VirtualSize; + ULONG PageFaultCount; SIZE_T PeakWorkingSetSize; SIZE_T WorkingSetSize; SIZE_T QuotaPeakPagedPoolUsage; @@ -890,7 +891,7 @@ LARGE_INTEGER WriteTransferCount; LARGE_INTEGER OtherTransferCount; - //SYSTEM_THREAD_INFORMATION TH[1]; + SYSTEM_THREAD_INFORMATION TH[1]; } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION; // Class 6 @@ -959,7 +960,7 @@ typedef struct _SYSTEM_POOL_INFORMATION { - ULONG TotalSize; + SIZE_T TotalSize; PVOID FirstEntry; USHORT EntryOverhead; BOOLEAN PoolTagPresent; @@ -1072,13 +1073,13 @@ // Class 21 typedef struct _SYSTEM_FILECACHE_INFORMATION { - ULONG CurrentSize; - ULONG PeakSize; + SIZE_T CurrentSize; + SIZE_T PeakSize; ULONG PageFaultCount; - ULONG MinimumWorkingSet; - ULONG MaximumWorkingSet; - ULONG CurrentSizeIncludingTransitionInPages; - ULONG PeakSizeIncludingTransitionInPages; + SIZE_T MinimumWorkingSet; + SIZE_T MaximumWorkingSet; + SIZE_T CurrentSizeIncludingTransitionInPages; + SIZE_T PeakSizeIncludingTransitionInPages; ULONG TransitionRePurposeCount; ULONG Flags; } SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION; @@ -1098,6 +1099,7 @@ ULONG NonPagedFrees; SIZE_T NonPagedUsed; } SYSTEM_POOLTAG, *PSYSTEM_POOLTAG; + typedef struct _SYSTEM_POOLTAG_INFORMATION { ULONG Count; @@ -1229,7 +1231,7 @@ { ULONG RegistryQuotaAllowed; ULONG RegistryQuotaUsed; - ULONG PagedPoolSize; + SIZE_T PagedPoolSize; } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION; // Class 38 @@ -1274,7 +1276,6 @@ { PNP_VETO_TYPE VetoType; UNICODE_STRING VetoDriver; - // CHAR Buffer[0]; } SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION; // Class 44 @@ -1451,6 +1452,7 @@ SIZE_T BadPageCount; SIZE_T PageCountByPriority[8]; SIZE_T RepurposedPagesByPriority[8]; + SIZE_T ModifiedPageCountPageFile; } SYSTEM_MEMORY_LIST_INFORMATION, *PSYSTEM_MEMORY_LIST_INFORMATION; #endif Modified: trunk/reactos/include/ndk/ldrtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ldrtypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/ldrtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/ldrtypes.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -114,6 +114,10 @@ LIST_ENTRY InMemoryOrderModuleList; LIST_ENTRY InInitializationOrderModuleList; PVOID EntryInProgress; +#if (NTDDI_VERSION >= NTDDI_WIN7) + UCHAR ShutdownInProgress; + PVOID ShutdownThreadId; +#endif } PEB_LDR_DATA, *PPEB_LDR_DATA; // Modified: trunk/reactos/include/ndk/peb_teb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/peb_teb.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/peb_teb.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/peb_teb.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -146,7 +146,7 @@ PTR(PVOID*) FlsCallback; STRUCT(LIST_ENTRY) FlsListHead; PTR(PVOID) FlsBitmap; - ULONG FlsBitmapBits[4]; + ULONG FlsBitmapBits[FLS_MAXIMUM_AVAILABLE/(sizeof(ULONG)*8)]; ULONG FlsHighIndex; #endif #if (NTDDI_VERSION >= NTDDI_LONGHORN) @@ -189,6 +189,7 @@ #endif #endif +#define GDI_BATCH_BUFFER_SIZE 0x136 // // GDI Batch Descriptor // @@ -196,7 +197,7 @@ { ULONG Offset; PTR(HANDLE) HDC; - ULONG Buffer[0x136]; + ULONG Buffer[GDI_BATCH_BUFFER_SIZE]; } STRUCT(GDI_TEB_BATCH), *STRUCT(PGDI_TEB_BATCH); // Modified: trunk/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -764,6 +764,19 @@ LARGE_INTEGER UserTime; } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES; +typedef struct _POOLED_USAGE_AND_LIMITS +{ + SIZE_T PeakPagedPoolUsage; + SIZE_T PagedPoolUsage; + SIZE_T PagedPoolLimit; + SIZE_T PeakNonPagedPoolUsage; + SIZE_T NonPagedPoolUsage; + SIZE_T NonPagedPoolLimit; + SIZE_T PeakPagefileUsage; + SIZE_T PagefileUsage; + SIZE_T PagefileLimit; +} POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS; + typedef struct _PROCESS_SESSION_INFORMATION { ULONG SessionId; Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -964,7 +964,7 @@ NTAPI RtlWalkHeap( IN HANDLE HeapHandle, - IN PVOID HeapEntry + IN OUT PRTL_HEAP_WALK_ENTRY HeapEntry ); #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap) @@ -1818,7 +1818,7 @@ PCHAR MbString, ULONG MbSize, PULONG ResultSize, - PWCHAR UnicodeString, + PCWCH UnicodeString, ULONG UnicodeSize ); @@ -1998,6 +1998,16 @@ ); NTSYSAPI +VOID +NTAPI +RtlFillMemoryUlonglong( + OUT PVOID Destination, + IN SIZE_T Length, + IN ULONGLONG Pattern +); + + +NTSYSAPI SIZE_T NTAPI RtlCompareMemoryUlong( @@ -2079,6 +2089,25 @@ PCANSI_STRING String2, BOOLEAN CaseInsensitive ); + +#ifdef _M_X64 +NTSYSAPI +NTSTATUS +NTAPI +RtlWow64GetThreadContext( + IN HANDLE ThreadHandle, + IN OUT PWOW64_CONTEXT ThreadContext +); + + +NTSYSAPI +NTSTATUS +NTAPI +RtlWow64SetThreadContext( + IN HANDLE ThreadHandle, + IN PWOW64_CONTEXT ThreadContext +); +#endif NTSYSAPI BOOLEAN @@ -2321,6 +2350,25 @@ IN PINITIAL_TEB InitialTeb ); +#ifdef _M_AMD64 +NTSYSAPI +NTSTATUS +NTAPI +RtlWow64GetThreadContext( + IN HANDLE ThreadHandle, + IN OUT PWOW64_CONTEXT ThreadContext +); + + +NTSYSAPI +NTSTATUS +NTAPI +RtlWow64SetThreadContext( + IN HANDLE ThreadHandle, + IN PWOW64_CONTEXT ThreadContext +); +#endif + NTSYSAPI BOOLEAN NTAPI @@ -2545,6 +2593,19 @@ OUT PWSTR *ShortName ); +#if (NTDDI_VERSION >= NTDDI_WIN7) +NTSYSAPI +NTSTATUS +NTAPI +RtlGetFullPathName_UEx( + IN PWSTR FileName, + IN ULONG BufferLength, + OUT PWSTR Buffer, + OUT OPTIONAL PWSTR *FilePart, + OUT OPTIONAL RTL_PATH_TYPE *InputPathType + ); +#endif + ULONG NTAPI RtlGetFullPathName_UstrEx( @@ -2586,9 +2647,9 @@ NTSTATUS NTAPI RtlQueryEnvironmentVariable_U( - PWSTR Environment, - PUNICODE_STRING Name, - PUNICODE_STRING Value + IN OPTIONAL PWSTR Environment, + IN PUNICODE_STRING Name, + OUT PUNICODE_STRING Value ); VOID @@ -2602,6 +2663,14 @@ NTAPI RtlSetCurrentDirectory_U( IN PUNICODE_STRING name +); + +NTSYSAPI +NTSTATUS +NTAPI +RtlSetCurrentEnvironment( + IN PVOID Environment, + OUT OPTIONAL PVOID *PreviousEnvironment ); NTSYSAPI Modified: trunk/reactos/include/ndk/rtltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -36,17 +36,22 @@ // #define RTL_USER_PROCESS_PARAMETERS_NORMALIZED 0x01 #define RTL_USER_PROCESS_PARAMETERS_PROFILE_USER 0x02 -#define RTL_USER_PROCESS_PARAMETERS_PROFILE_SERVER 0x04 -#define RTL_USER_PROCESS_PARAMETERS_PROFILE_KERNEL 0x08 +#define RTL_USER_PROCESS_PARAMETERS_PROFILE_KERNEL 0x04 +#define RTL_USER_PROCESS_PARAMETERS_PROFILE_SERVER 0x08 #define RTL_USER_PROCESS_PARAMETERS_UNKNOWN 0x10 #define RTL_USER_PROCESS_PARAMETERS_RESERVE_1MB 0x20 #define RTL_USER_PROCESS_PARAMETERS_RESERVE_16MB 0x40 +#define RTL_USER_PROCESS_PARAMETERS_CASE_SENSITIVE 0x80 #define RTL_USER_PROCESS_PARAMETERS_DISABLE_HEAP_CHECKS 0x100 #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_1 0x200 #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_2 0x400 #define RTL_USER_PROCESS_PARAMETERS_PRIVATE_DLL_PATH 0x1000 -#define RTL_USER_PROCESS_PARAMETERS_LOCAL_DLL_PATH 0x2000 +#define RTL_USER_PROCESS_PARAMETERS_APP_MANIFEST_PRESENT 0x2000 +#define RTL_USER_PROCESS_PARAMETERS_IMAGE_KEY_MISSING 0x4000 #define RTL_USER_PROCESS_PARAMETERS_NX 0x20000 + +#define RTL_MAX_DRIVE_LETTERS 32 +#define RTL_DRIVE_LETTER_VALID (USHORT)0x0001 // // Exception Flags @@ -901,28 +906,78 @@ typedef struct _RTL_HEAP_TAG_INFO { - ULONG NumberOfAllocations; - ULONG NumberOfFrees; - ULONG BytesAllocated; + ULONG NumberOfAllocations; + ULONG NumberOfFrees; + SIZE_T BytesAllocated; } RTL_HEAP_TAG_INFO, *PRTL_HEAP_TAG_INFO; typedef struct _RTL_HEAP_USAGE_ENTRY { struct _RTL_HEAP_USAGE_ENTRY *Next; + PVOID Address; + SIZE_T Size; + USHORT AllocatorBackTraceIndex; + USHORT TagIndex; } RTL_HEAP_USAGE_ENTRY, *PRTL_HEAP_USAGE_ENTRY; typedef struct _RTL_HEAP_USAGE { ULONG Length; - ULONG BytesAllocated; - ULONG BytesCommitted; - ULONG BytesReserved; - ULONG BytesReservedMaximum; + SIZE_T BytesAllocated; + SIZE_T BytesCommitted; + SIZE_T BytesReserved; + SIZE_T BytesReservedMaximum; PRTL_HEAP_USAGE_ENTRY Entries; PRTL_HEAP_USAGE_ENTRY AddedEntries; PRTL_HEAP_USAGE_ENTRY RemovedEntries; - UCHAR Reserved[32]; + ULONG_PTR Reserved[8]; } RTL_HEAP_USAGE, *PRTL_HEAP_USAGE; + +typedef struct _RTL_HEAP_WALK_ENTRY +{ + PVOID DataAddress; + SIZE_T DataSize; + UCHAR OverheadBytes; + UCHAR SegmentIndex; + USHORT Flags; + union + { + struct + { + SIZE_T Settable; + USHORT TagIndex; + USHORT AllocatorBackTraceIndex; + ULONG Reserved[2]; + } Block; + struct + { + ULONG_PTR CommittedSize; + ULONG_PTR UnCommittedSize; + PVOID FirstEntry; + PVOID LastEntry; + } Segment; + }; +} RTL_HEAP_WALK_ENTRY, *PRTL_HEAP_WALK_ENTRY; + +typedef struct _RTL_HEAP_ENTRY +{ + SIZE_T Size; + USHORT Flags; + USHORT AllocatorBackTraceIndex; + union + { + struct + { + SIZE_T Settable; + ULONG Tag; + } s1; + struct + { + SIZE_T CommittedSize; + PVOID FirstBlock; + } s2; + } u; +} RTL_HEAP_ENTRY, *PRTL_HEAP_ENTRY; typedef struct _RTL_HEAP_INFORMATION { @@ -930,15 +985,15 @@ ULONG Flags; USHORT EntryOverhead; USHORT CreatorBackTraceIndex; - ULONG BytesAllocated; - ULONG BytesCommitted; + SIZE_T BytesAllocated; + SIZE_T BytesCommitted; ULONG NumberOfTags; ULONG NumberOfEntries; ULONG NumberOfPseudoTags; ULONG PseudoTagGranularity; ULONG Reserved[4]; - PVOID Tags; - PVOID Entries; + PRTL_HEAP_TAG Tags; + PRTL_HEAP_ENTRY Entries; } RTL_HEAP_INFORMATION, *PRTL_HEAP_INFORMATION; typedef struct _RTL_PROCESS_HEAPS @@ -1196,6 +1251,8 @@ // // RTL Resource // +#define RTL_RESOURCE_FLAG_LONG_TERM ((ULONG)0x00000001) + typedef struct _RTL_RESOURCE { RTL_CRITICAL_SECTION Lock; @@ -1205,8 +1262,8 @@ ULONG ExclusiveWaiters; LONG NumberActive; HANDLE OwningThread; - ULONG TimeoutBoost; - PVOID DebugInfo; + ULONG Flags; + PRTL_RESOURCE_DEBUG DebugInfo; } RTL_RESOURCE, *PRTL_RESOURCE; // @@ -1241,7 +1298,13 @@ UNICODE_STRING DesktopInfo; UNICODE_STRING ShellInfo; UNICODE_STRING RuntimeData; - RTL_DRIVE_LETTER_CURDIR CurrentDirectories[32]; + RTL_DRIVE_LETTER_CURDIR CurrentDirectories[RTL_MAX_DRIVE_LETTERS]; +#if (NTDDI_VERSION >= NTDDI_LONGHORN) + SIZE_T EnvironmentSize; +#endif +#if (NTDDI_VERSION >= NTDDI_WIN7) + SIZE_T EnvironmentVersion; +#endif } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS; typedef struct _RTL_USER_PROCESS_INFORMATION Modified: trunk/reactos/include/xdk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] Tue Jan 24 21:15:55 2012 @@ -1369,7 +1369,7 @@ _Out_writes_bytes_to_(MaxBytesInMultiByteString, *BytesInMultiByteString) PCHAR MultiByteString, _In_ ULONG MaxBytesInMultiByteString, _Out_opt_ PULONG BytesInMultiByteString, - _In_reads_bytes_(BytesInUnicodeString) PWCH UnicodeString, + _In_reads_bytes_(BytesInUnicodeString) PCWCH UnicodeString, _In_ ULONG BytesInUnicodeString); _IRQL_requires_max_(PASSIVE_LEVEL)
12 years, 11 months
1
0
0
0
[tfaber] 55150: [FREELDR] - Do not declare functions without prototypes - DPRINT fix - Powered by VS11
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jan 24 20:57:03 2012 New Revision: 55150 URL:
http://svn.reactos.org/svn/reactos?rev=55150&view=rev
Log: [FREELDR] - Do not declare functions without prototypes - DPRINT fix - Powered by VS11 Modified: trunk/reactos/boot/freeldr/freeldr/debug.c trunk/reactos/boot/freeldr/freeldr/include/bget.h trunk/reactos/boot/freeldr/freeldr/mm/heap.c Modified: trunk/reactos/boot/freeldr/freeldr/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] Tue Jan 24 20:57:03 2012 @@ -188,7 +188,7 @@ } DebugStartOfLine = FALSE; // We don't want line headers - DbgPrint("Dumping buffer at 0x%x with length of %d bytes:\n", Buffer, Length); + DbgPrint("Dumping buffer at %p with length of %lu bytes:\n", Buffer, Length); for (Idx=0; Idx<Length; ) { Modified: trunk/reactos/boot/freeldr/freeldr/include/bget.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/bget.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/bget.h [iso-8859-1] Tue Jan 24 20:57:03 2012 @@ -4,27 +4,19 @@ */ -#ifndef _ -#ifdef PROTOTYPES -#define _(x) x /* If compiler knows prototypes */ -#else -#define _(x) () /* It it doesn't */ -#endif /* PROTOTYPES */ -#endif - typedef long bufsize; -void bpool _((void *buffer, bufsize len)); -void *bget _((bufsize size)); -void *bgetz _((bufsize size)); -void *bgetr _((void *buffer, bufsize newsize)); -void brel _((void *buf)); -void bectl _((int (*compact)(bufsize sizereq, int sequence), - void *(*acquire)(bufsize size), - void (*release)(void *buf), bufsize pool_incr)); -void bstats _((bufsize *curalloc, bufsize *totfree, bufsize *maxfree, - long *nget, long *nrel)); -void bstatse _((bufsize *pool_incr, long *npool, long *npget, - long *nprel, long *ndget, long *ndrel)); -void bufdump _((void *buf)); -void bpoold _((void *pool, int dumpalloc, int dumpfree)); -int bpoolv _((void *pool)); +void bpool (void *buffer, bufsize len); +void *bget (bufsize size); +void *bgetz (bufsize size); +void *bgetr (void *buffer, bufsize newsize); +void brel (void *buf); +void bectl (int (*compact)(bufsize sizereq, int sequence), + void *(*acquire)(bufsize size), + void (*release)(void *buf), bufsize pool_incr); +void bstats (bufsize *curalloc, bufsize *totfree, bufsize *maxfree, + long *nget, long *nrel); +void bstatse (bufsize *pool_incr, long *npool, long *npget, + long *nprel, long *ndget, long *ndrel); +void bufdump (void *buf); +void bpoold (void *pool, int dumpalloc, int dumpfree); +int bpoolv (void *pool); Modified: trunk/reactos/boot/freeldr/freeldr/mm/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/he…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/heap.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/heap.c [iso-8859-1] Tue Jan 24 20:57:03 2012 @@ -42,7 +42,7 @@ } // Initialize BGET - bpool(HeapStart << MM_PAGE_SHIFT, PagesNeeded << MM_PAGE_SHIFT); + bpool((PVOID)(HeapStart << MM_PAGE_SHIFT), PagesNeeded << MM_PAGE_SHIFT); // Mark those pages as used MmMarkPagesInLookupTable(PageLookupTableAddress, HeapStart, PagesNeeded, LoaderOsloaderHeap);
12 years, 11 months
1
0
0
0
[janderwald] 55149: [USBEHCI] - Display error status when host controller reports failure
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Jan 24 20:49:01 2012 New Revision: 55149 URL:
http://svn.reactos.org/svn/reactos?rev=55149&view=rev
Log: [USBEHCI] - Display error status when host controller reports failure Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Tue Jan 24 20:49:01 2012 @@ -1028,8 +1028,10 @@ // // controller reported error // + DPRINT1("CStatus %x\n", CStatus); Status = STATUS_UNSUCCESSFUL; PC_ASSERT(FALSE); + return; } //
12 years, 11 months
1
0
0
0
[tfaber] 55148: [CRYPT32] - Fix MSVC build. Sent and applied upstream.
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jan 24 20:34:31 2012 New Revision: 55148 URL:
http://svn.reactos.org/svn/reactos?rev=55148&view=rev
Log: [CRYPT32] - Fix MSVC build. Sent and applied upstream. Modified: trunk/reactos/dll/win32/crypt32/msg.c Modified: trunk/reactos/dll/win32/crypt32/msg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/msg.c?re…
============================================================================== --- trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] Tue Jan 24 20:34:31 2012 @@ -1809,7 +1809,12 @@ char oid_rsa_data[] = szOID_RSA_data; CRYPT_ENVELOPED_DATA envelopedData = { CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION, msg->cRecipientInfo, - msg->recipientInfo, { oid_rsa_data, msg->algo, msg->data } + msg->recipientInfo, { oid_rsa_data, { + msg->algo.pszObjId, + { msg->algo.Parameters.cbData, msg->algo.Parameters.pbData } + }, + { msg->data.cbData, msg->data.pbData } + } }; ret = CRYPT_AsnEncodePKCSEnvelopedData(&envelopedData, pvData,
12 years, 11 months
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200