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
November 2019
----- 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
24 participants
322 discussions
Start a n
N
ew thread
[reactos] 05/12: [VIDEOPRT] Code formatting only.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e930b868a00c682fd5540…
commit e930b868a00c682fd554088b0453489179f6293f Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Nov 25 00:29:36 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Nov 25 00:41:52 2019 +0100 [VIDEOPRT] Code formatting only. --- win32ss/drivers/videoprt/event.c | 43 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/win32ss/drivers/videoprt/event.c b/win32ss/drivers/videoprt/event.c index c4cf2d272f5..16153397f8a 100644 --- a/win32ss/drivers/videoprt/event.c +++ b/win32ss/drivers/videoprt/event.c @@ -21,10 +21,11 @@ */ VP_STATUS NTAPI -VideoPortCreateEvent(IN PVOID HwDeviceExtension, - IN ULONG EventFlag, - IN PVOID Unused, - OUT PEVENT *Event) +VideoPortCreateEvent( + _In_ PVOID HwDeviceExtension, + _In_ ULONG EventFlag, + _In_ PVOID Unused, + _Out_ PEVENT* pEvent) { VP_STATUS Result = NO_ERROR; PVIDEO_PORT_EVENT EngEvent; @@ -40,7 +41,7 @@ VideoPortCreateEvent(IN PVOID HwDeviceExtension, /* Set KEVENT pointer */ EngEvent->pKEvent = EngEvent + 1; - + /* Initialize the kernel event */ KeInitializeEvent(EngEvent->pKEvent, (EventFlag & EVENT_TYPE_MASK) ? @@ -48,13 +49,13 @@ VideoPortCreateEvent(IN PVOID HwDeviceExtension, EventFlag & INITIAL_EVENT_STATE_MASK); /* Pass pointer to our structure to the caller */ - *Event = (PEVENT)EngEvent; + *pEvent = (PEVENT)EngEvent; DPRINT("VideoPortCreateEvent() created %p\n", EngEvent); } else { /* Out of memory */ - DPRINT("VideoPortCreateEvent() failed\n"); + DPRINT("VideoPortCreateEvent() failed\n"); Result = ERROR_NOT_ENOUGH_MEMORY; } @@ -67,8 +68,9 @@ VideoPortCreateEvent(IN PVOID HwDeviceExtension, */ VP_STATUS NTAPI -VideoPortDeleteEvent(IN PVOID HwDeviceExtension, - IN PEVENT Event) +VideoPortDeleteEvent( + _In_ PVOID HwDeviceExtension, + _In_ PEVENT Event) { /* Handle error cases */ if (!Event) return ERROR_INVALID_PARAMETER; @@ -87,8 +89,9 @@ VideoPortDeleteEvent(IN PVOID HwDeviceExtension, */ LONG NTAPI -VideoPortSetEvent(IN PVOID HwDeviceExtension, - IN PEVENT Event) +VideoPortSetEvent( + _In_ PVOID HwDeviceExtension, + _In_ PEVENT Event) { return KeSetEvent(Event->pKEvent, IO_NO_INCREMENT, FALSE); } @@ -98,8 +101,9 @@ VideoPortSetEvent(IN PVOID HwDeviceExtension, */ VOID NTAPI -VideoPortClearEvent(IN PVOID HwDeviceExtension, - IN PEVENT Event) +VideoPortClearEvent( + _In_ PVOID HwDeviceExtension, + _In_ PEVENT Event) { KeClearEvent(Event->pKEvent); } @@ -109,18 +113,19 @@ VideoPortClearEvent(IN PVOID HwDeviceExtension, */ VP_STATUS NTAPI -VideoPortWaitForSingleObject(IN PVOID HwDeviceExtension, - IN PVOID Event, - IN PLARGE_INTEGER Timeout OPTIONAL) +VideoPortWaitForSingleObject( + _In_ PVOID HwDeviceExtension, + _In_ PVOID Event, + _In_opt_ PLARGE_INTEGER Timeout) { PVIDEO_PORT_EVENT EngEvent = Event; NTSTATUS Status; - + /* Handle error cases */ if (!EngEvent) return ERROR_INVALID_PARAMETER; if (!EngEvent->pKEvent) return ERROR_INVALID_PARAMETER; if (EngEvent->fFlags & ENG_EVENT_USERMAPPED) return ERROR_INVALID_PARAMETER; - + /* Do the actual wait */ Status = KeWaitForSingleObject(EngEvent->pKEvent, Executive, @@ -137,7 +142,7 @@ VideoPortWaitForSingleObject(IN PVOID HwDeviceExtension, /* All other success codes are Win32 success */ return NO_ERROR; } - + /* Otherwise, return default Win32 failure */ return ERROR_INVALID_PARAMETER; }
5 years, 1 month
1
0
0
0
[reactos] 04/12: [WIN32K] Add some validity checks in PDEVOBJ_vReference() and use it instead of explicitly manipulating ppdev->cPdevRefs.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=148e137b421587abfa0ca…
commit 148e137b421587abfa0ca987cb12a51d267a62d7 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Nov 24 21:22:21 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Nov 25 00:41:51 2019 +0100 [WIN32K] Add some validity checks in PDEVOBJ_vReference() and use it instead of explicitly manipulating ppdev->cPdevRefs. --- win32ss/gdi/eng/pdevobj.c | 2 +- win32ss/gdi/eng/pdevobj.h | 25 ++++++++++++++++++------- win32ss/gdi/ntgdi/dclife.c | 2 +- win32ss/gdi/ntgdi/dcstate.c | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/win32ss/gdi/eng/pdevobj.c b/win32ss/gdi/eng/pdevobj.c index 450d37f6785..4147f0fa749 100644 --- a/win32ss/gdi/eng/pdevobj.c +++ b/win32ss/gdi/eng/pdevobj.c @@ -630,7 +630,7 @@ EngpGetPDEV( if (ppdev) { /* Yes, reference the PDEV */ - InterlockedIncrement(&ppdev->cPdevRefs); + PDEVOBJ_vReference(ppdev); } else { diff --git a/win32ss/gdi/eng/pdevobj.h b/win32ss/gdi/eng/pdevobj.h index 9b986acde13..a232a2e057c 100644 --- a/win32ss/gdi/eng/pdevobj.h +++ b/win32ss/gdi/eng/pdevobj.h @@ -162,6 +162,24 @@ NTAPI EngpGetPDEV( _In_opt_ PUNICODE_STRING pustrDevice); +FORCEINLINE +VOID +PDEVOBJ_vReference( + _In_ PPDEVOBJ ppdev) +{ + ASSERT(ppdev); + + /* Fail if the PDEV is being destroyed */ + if (ppdev->cPdevRefs == 0) + { + ASSERT(FALSE); + return; + } + ASSERT(ppdev->cPdevRefs > 0); + + InterlockedIncrement(&ppdev->cPdevRefs); +} + VOID NTAPI PDEVOBJ_vRelease( @@ -201,11 +219,4 @@ PDEVOBJ_pdmMatchDevMode( PPDEVOBJ ppdev, PDEVMODEW pdm); -FORCEINLINE -VOID -PDEVOBJ_vReference(PPDEVOBJ ppdev) -{ - InterlockedIncrement(&ppdev->cPdevRefs); -} - #endif /* !__WIN32K_PDEVOBJ_H */ diff --git a/win32ss/gdi/ntgdi/dclife.c b/win32ss/gdi/ntgdi/dclife.c index 99d872a9c2f..52236c037c3 100644 --- a/win32ss/gdi/ntgdi/dclife.c +++ b/win32ss/gdi/ntgdi/dclife.c @@ -836,7 +836,7 @@ GreCreateCompatibleDC(HDC hdc, BOOL bAltDc) /* Get the pdev from the DC */ ppdev = pdc->ppdev; - InterlockedIncrement(&ppdev->cPdevRefs); + PDEVOBJ_vReference(ppdev); /* Unlock the source DC */ DC_UnlockDc(pdc); diff --git a/win32ss/gdi/ntgdi/dcstate.c b/win32ss/gdi/ntgdi/dcstate.c index ccf7c134e7f..314eaa6c380 100644 --- a/win32ss/gdi/ntgdi/dcstate.c +++ b/win32ss/gdi/ntgdi/dcstate.c @@ -282,7 +282,7 @@ NtGdiSaveDC( } hdcSave = pdcSave->BaseObject.hHmgr; - InterlockedIncrement(&pdc->ppdev->cPdevRefs); + PDEVOBJ_vReference(pdc->ppdev); DC_vInitDc(pdcSave, DCTYPE_MEMORY, pdc->ppdev); /* Handle references here correctly */
5 years, 1 month
1
0
0
0
[reactos] 03/12: [WIN32K] Use RtlString* routines.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=acf689a97365ae9cebdd6…
commit acf689a97365ae9cebdd653f3edcfab4a13f8d65 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Nov 24 21:51:22 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Nov 25 00:41:49 2019 +0100 [WIN32K] Use RtlString* routines. --- win32ss/gdi/eng/device.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index e5f30aa0bba..7691aad92f5 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -83,8 +83,7 @@ EngpPopulateDeviceModeList( /* Some drivers like the VBox driver don't fill the dmDeviceName with the name of the display driver. So fix that here. */ - wcsncpy(pdm->dmDeviceName, pwsz, CCHDEVICENAME); - pdm->dmDeviceName[CCHDEVICENAME - 1] = 0; + RtlStringCbCopyW(pdm->dmDeviceName, sizeof(pdm->dmDeviceName), pwsz); } // FIXME: release the driver again until it's used? @@ -205,14 +204,17 @@ EngpRegisterGraphicsDevice( pGraphicsDevice->DeviceObject = pDeviceObject; pGraphicsDevice->FileObject = pFileObject; - /* Copy device name */ + /* Copy the device name */ RtlStringCbCopyNW(pGraphicsDevice->szNtDeviceName, - sizeof(pGraphicsDevice->szNtDeviceName), - pustrDeviceName->Buffer, - pustrDeviceName->Length); - - /* Create a win device name (FIXME: virtual devices!) */ - swprintf(pGraphicsDevice->szWinDeviceName, L"\\\\.\\DISPLAY%d", (int)giDevNum); + sizeof(pGraphicsDevice->szNtDeviceName), + pustrDeviceName->Buffer, + pustrDeviceName->Length); + + /* Create a Win32 device name (FIXME: virtual devices!) */ + RtlStringCbPrintfW(pGraphicsDevice->szWinDeviceName, + sizeof(pGraphicsDevice->szWinDeviceName), + L"\\\\.\\DISPLAY%d", + (int)giDevNum); /* Allocate a buffer for the strings */ cj = pustrDiplayDrivers->Length + pustrDescription->Length + sizeof(WCHAR);
5 years, 1 month
1
0
0
0
[reactos] 02/12: [WIN32K] Code formatting.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0ad90f83d3bfdbebb6143…
commit 0ad90f83d3bfdbebb6143e88a01fc2897474d2a8 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Nov 24 21:19:14 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Nov 25 00:41:49 2019 +0100 [WIN32K] Code formatting. --- win32ss/gdi/eng/device.c | 14 ++++++-------- win32ss/gdi/eng/pdevobj.c | 30 ++++++++++++++++-------------- win32ss/user/ntuser/display.c | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index 6d20e30de55..e5f30aa0bba 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -51,8 +51,8 @@ EngpPopulateDeviceModeList( * This is a REG_MULTI_SZ string */ for (; *pwsz; pwsz += wcslen(pwsz) + 1) { - TRACE("trying driver: %ls\n", pwsz); /* Try to load the display driver */ + TRACE("Trying driver: %ls\n", pwsz); pldev = EngLoadImageEx(pwsz, LDEV_DEVICE_DISPLAY); if (!pldev) { @@ -186,14 +186,14 @@ EngpRegisterGraphicsDevice( return NULL; } - /* Try to open the driver */ + /* Try to open and enable the device */ Status = IoGetDeviceObjectPointer(pustrDeviceName, FILE_READ_DATA | FILE_WRITE_DATA, &pFileObject, &pDeviceObject); if (!NT_SUCCESS(Status)) { - ERR("Could not open driver %wZ, 0x%lx\n", pustrDeviceName, Status); + ERR("Could not open device %wZ, 0x%lx\n", pustrDeviceName, Status); ExFreePoolWithTag(pGraphicsDevice, GDITAG_GDEVICE); return NULL; } @@ -225,13 +225,13 @@ EngpRegisterGraphicsDevice( return NULL; } - /* Copy display driver names */ + /* Copy the display driver names */ pGraphicsDevice->pDiplayDrivers = pwsz; RtlCopyMemory(pGraphicsDevice->pDiplayDrivers, pustrDiplayDrivers->Buffer, pustrDiplayDrivers->Length); - /* Copy description */ + /* Copy the description */ pGraphicsDevice->pwszDescription = pwsz + pustrDiplayDrivers->Length / sizeof(WCHAR); RtlCopyMemory(pGraphicsDevice->pwszDescription, pustrDescription->Buffer, @@ -265,7 +265,7 @@ EngpRegisterGraphicsDevice( if (!gpGraphicsDeviceFirst) gpGraphicsDeviceFirst = pGraphicsDevice; - /* Increment device number */ + /* Increment the device number */ giDevNum++; /* Unlock loader */ @@ -275,7 +275,6 @@ EngpRegisterGraphicsDevice( return pGraphicsDevice; } - PGRAPHICS_DEVICE NTAPI EngpFindGraphicsDevice( @@ -321,7 +320,6 @@ EngpFindGraphicsDevice( return pGraphicsDevice; } - static NTSTATUS EngpFileIoRequest( diff --git a/win32ss/gdi/eng/pdevobj.c b/win32ss/gdi/eng/pdevobj.c index 19c2fee06ba..450d37f6785 100644 --- a/win32ss/gdi/eng/pdevobj.c +++ b/win32ss/gdi/eng/pdevobj.c @@ -90,15 +90,15 @@ PDEVOBJ_vDeletePDEV( VOID NTAPI -PDEVOBJ_vRelease(PPDEVOBJ ppdev) +PDEVOBJ_vRelease( + _Inout_ PPDEVOBJ ppdev) { /* Lock loader */ EngAcquireSemaphore(ghsemPDEV); /* Decrease reference count */ - --ppdev->cPdevRefs; - - ASSERT(ppdev->cPdevRefs >= 0) ; + InterlockedDecrement(&ppdev->cPdevRefs); + ASSERT(ppdev->cPdevRefs >= 0); /* Check if references are left */ if (ppdev->cPdevRefs == 0) @@ -112,7 +112,7 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev) } /* Do we have a palette? */ - if(ppdev->ppalSurf) + if (ppdev->ppalSurf) { PALETTE_ShareUnlockPalette(ppdev->ppalSurf); } @@ -125,20 +125,22 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev) } /* Remove it from list */ - if( ppdev == gppdevList ) - gppdevList = ppdev->ppdevNext ; + if (ppdev == gppdevList) + { + gppdevList = ppdev->ppdevNext; + } else { PPDEVOBJ ppdevCurrent = gppdevList; - BOOL found = FALSE ; + BOOL found = FALSE; while (!found && ppdevCurrent->ppdevNext) { if (ppdevCurrent->ppdevNext == ppdev) found = TRUE; else - ppdevCurrent = ppdevCurrent->ppdevNext ; + ppdevCurrent = ppdevCurrent->ppdevNext; } - if(found) + if (found) ppdevCurrent->ppdevNext = ppdev->ppdevNext; } @@ -152,7 +154,6 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev) /* Unlock loader */ EngReleaseSemaphore(ghsemPDEV); - } BOOL @@ -320,7 +321,7 @@ PDEVOBJ_pdmMatchDevMode( /* Compare asked DEVMODE fields * Only compare those that are valid in both DEVMODE structs */ - dwFields = pdmCurrent->dmFields & pdm->dmFields ; + dwFields = pdmCurrent->dmFields & pdm->dmFields; /* For now, we only need those */ if ((dwFields & DM_BITSPERPEL) && @@ -348,6 +349,7 @@ EngpCreatePDEV( { PGRAPHICS_DEVICE pGraphicsDevice; PPDEVOBJ ppdev; + DPRINT("EngpCreatePDEV(%wZ, %p)\n", pustrDeviceName, pdm); /* Try to find the GRAPHICS_DEVICE */ @@ -407,7 +409,7 @@ EngpCreatePDEV( ppdev->hSpooler = ppdev->pGraphicsDevice->DeviceObject; // Should we change the ative mode of pGraphicsDevice ? - ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, pdm) ; + ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, pdm); /* FIXME! */ ppdev->flFlags = PDEV_DISPLAY; @@ -561,7 +563,7 @@ PDEVOBJ_bSwitchMode( PDEVOBJ_vRelease(ppdevTmp); /* Update primary display capabilities */ - if(ppdev == gppdevPrimary) + if (ppdev == gppdevPrimary) { PDEVOBJ_vGetDeviceCaps(ppdev, &GdiHandleTable->DevCaps); } diff --git a/win32ss/user/ntuser/display.c b/win32ss/user/ntuser/display.c index 3f2b99cc229..cebaf8c1148 100644 --- a/win32ss/user/ntuser/display.c +++ b/win32ss/user/ntuser/display.c @@ -557,7 +557,7 @@ UserEnumRegistryDisplaySettings( ZwClose(hkey); return STATUS_SUCCESS; } - return Status ; + return Status; } NTSTATUS @@ -674,6 +674,7 @@ NtUserEnumDisplaySettings( return Status; } + VOID UserUpdateFullscreen( DWORD flags) @@ -1012,4 +1013,3 @@ NtUserChangeDisplaySettings( return lRet; } -
5 years, 1 month
1
0
0
0
[reactos] 01/12: [PCIX][BLUE] Don't hardcode values in KeDelayExecutionThread() call. Remove deprecated code.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=75f188c20028fe5493ca8…
commit 75f188c20028fe5493ca827e8758e01eecfa36f6 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Nov 24 21:13:35 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Nov 25 00:41:48 2019 +0100 [PCIX][BLUE] Don't hardcode values in KeDelayExecutionThread() call. Remove deprecated code. --- drivers/bus/pcix/power.c | 2 +- drivers/setup/blue/blue.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/bus/pcix/power.c b/drivers/bus/pcix/power.c index 323bd9553ed..8cac08f390c 100644 --- a/drivers/bus/pcix/power.c +++ b/drivers/bus/pcix/power.c @@ -88,7 +88,7 @@ PciStallForPowerChange(IN PPCI_PDO_EXTENSION PdoExtension, /* Do a wait for the timeout specified instead */ Interval.QuadPart = -10 * TimeoutEntry; Interval.QuadPart -= KeQueryTimeIncrement() - 1; - KeDelayExecutionThread(0, 0, &Interval); + KeDelayExecutionThread(KernelMode, FALSE, &Interval); } } diff --git a/drivers/setup/blue/blue.c b/drivers/setup/blue/blue.c index 1403c19ef57..7aa4f9d5d2e 100644 --- a/drivers/setup/blue/blue.c +++ b/drivers/setup/blue/blue.c @@ -15,14 +15,6 @@ #define NDEBUG #include <debug.h> -// ROS Internal. Please deprecate. -NTHALAPI -BOOLEAN -NTAPI -HalQueryDisplayOwnership( - VOID -); - /* NOTES ******************************************************************/ /* * [[character][attribute]][[character][attribute]]....
5 years, 1 month
1
0
0
0
[reactos] 01/01: [INF] Add the docking station device
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8813a0dff85ac01b30ac9…
commit 8813a0dff85ac01b30ac9c41321a3b0087f2b1c9 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Nov 24 19:08:20 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Nov 24 19:27:03 2019 +0100 [INF] Add the docking station device --- media/inf/machine.inf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/media/inf/machine.inf b/media/inf/machine.inf index 4bd292611a1..bed48883dee 100644 --- a/media/inf/machine.inf +++ b/media/inf/machine.inf @@ -46,6 +46,7 @@ HKR, , Icon, 0, "-27" %*PNP0C0D.DeviceDesc% = NO_DRV,*PNP0C0D %*PNP0C0E.DeviceDesc% = NO_DRV,*PNP0C0E %*PNP0C0F.DeviceDesc% = NO_DRV,*PNP0C0F +%*PNP0C15.DeviceDesc% = NO_DRV,*PNP0C15 %SWENUM.DeviceDesc% = SWENUM_Inst, ROOT\SWENUM %ACPI\FixedButton.DeviceDesc% = NO_DRV,ACPI\FixedButton @@ -169,6 +170,7 @@ GenericMfg = "(Generic system devices)" *PNP0C0D.DeviceDesc = "ACPI lid" *PNP0C0E.DeviceDesc = "ACPI sleep button device" *PNP0C0F.DeviceDesc = "PCI interrupt link device" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI fixed feature button" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Standard CPU to PCI bridge" @@ -212,6 +214,7 @@ GenericMfg = "(Obecná systémová zařízení)" *PNP0C0D.DeviceDesc = "ACPI víko" *PNP0C0E.DeviceDesc = "ACPI tlačítko spánku" *PNP0C0F.DeviceDesc = "PCI linkové zařízení přerušení" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI tlačítko s pevnou vlastností" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Standardní most CPU na PCI" @@ -247,6 +250,7 @@ GenericMfg = "(Generische Systemgeräte)" *PNP0C02.DeviceDesc = "Motherboard Ressourcen" *PNP0C04.DeviceDesc = "mathematischer Koprozessor" *PNP0C0B.DeviceDesc = "ACPI Ventilator" +*PNP0C15.DeviceDesc = "Dockingstation" PCI\CC_0500.DeviceDesc = "Standard PCI RAM-Controller" PCI\CC_0600.DeviceDesc = "Standard CPU zu PCI Brücke" PCI\CC_0601.DeviceDesc = "Standard PCI zu ISA Brücke" @@ -278,6 +282,7 @@ GenericMfg = "(Πρότυπες συσκευές συστήματος)" *PNP0C0D.DeviceDesc = "ACPI lid" *PNP0C0E.DeviceDesc = "ACPI sleep button device" *PNP0C0F.DeviceDesc = "PCI interrupt link device" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI fixed feature button" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Πρότυπη γέφυρα από CPU σε PCI" @@ -318,6 +323,7 @@ GenericMfg = "(Dispositivos del sistema estándar)" *PNP0C0D.DeviceDesc = "Tapa ACPI" *PNP0C0E.DeviceDesc = "Botón de suspensión ACPI" *PNP0C0F.DeviceDesc = "Dispositivo de interrupción de enlaces PCI" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Botón de funcionalidad fija ACPI" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Puente CPU-PCI estándar" @@ -357,6 +363,7 @@ GenericMfg = "(Périphériques systèmes génériques)" *PNP0C0D.DeviceDesc = "ACPI lid" *PNP0C0E.DeviceDesc = "Périphérique de bouton de veille ACPI" *PNP0C0F.DeviceDesc = "Périphérique de lien d'interruption PCI" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Bouton de fonction définie ACPI" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Pont standard CPU vers PCI" @@ -392,6 +399,7 @@ GenericMfg = "(標準 システム デバイス)" *PNP0C0D.DeviceDesc = "ACPI lid" *PNP0C0E.DeviceDesc = "ACPI スリープボタン デバイス" *PNP0C0F.DeviceDesc = "PCI 割り込みリンクデバイス" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI 固定 機能 ボタン" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "スタンダード CPU to PCI ブリッジ" @@ -433,6 +441,7 @@ GenericMfg = "(Standardowe urządzenia systemowe)" *PNP0C0D.DeviceDesc = "Pokrywa ACPI" *PNP0C0E.DeviceDesc = "Przycisk zasypiania ACPI" *PNP0C0F.DeviceDesc = "Urządzenie PCI interrupt link" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Przycisk ACPI Fixed Feature" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Standardowy mostek CPU do PCI" @@ -472,6 +481,7 @@ GenericMfg = "(Dispositivos de sistema padrão)" *PNP0C0D.DeviceDesc = "Tampa ACPI" *PNP0C0E.DeviceDesc = "Botão dormir ACPI" *PNP0C0F.DeviceDesc = "Dispositivo de interrupção de ligações PCI" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Botão de recurso fixo ACPI" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Ponte padrão CPU - PCI" @@ -514,6 +524,7 @@ GenericMfg = "(dispozitiv generic de sistem)" *PNP0C0D.DeviceDesc = "Capac ACPI" *PNP0C0E.DeviceDesc = "Dispozitiv buton de repaus ACPI" *PNP0C0F.DeviceDesc = "Dispozitiv de întrerupere legătură PCI" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Buton de funcție fixă ACPI" PCI\CC_0500.DeviceDesc = "Dispozitiv de control PCI RAM standard" PCI\CC_0600.DeviceDesc = "Punte standard CPU spre PCI" @@ -553,6 +564,7 @@ GenericMfg = "(Стандартные системные устройства)" *PNP0C0D.DeviceDesc = "Крышка ACPI" *PNP0C0E.DeviceDesc = "Кнопка спящего режима ACPI" *PNP0C0F.DeviceDesc = "Контроллер прервываний PCI" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Кнопка фиксированной возможности ACPI" PCI\CC_0500.DeviceDesc = "Стандартный контроллер PCI RAM" PCI\CC_0600.DeviceDesc = "Стандартный процессор на мосте PCI" @@ -590,6 +602,7 @@ GenericMfg = "(Generické systémové zariadenia)" *PNP0C0D.DeviceDesc = "ACPI lid" *PNP0C0E.DeviceDesc = "ACPI sleep button device" *PNP0C0F.DeviceDesc = "PCI interrupt link device" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI fixed feature button" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Štandardný most CPU na PCI" @@ -631,6 +644,7 @@ GenericMfg = "(Umûmî Dizge Aygıtları)" *PNP0C0D.DeviceDesc = "ACPI Kapak" *PNP0C0E.DeviceDesc = "ACPI Uyku Düğmesi Aygıtı" *PNP0C0F.DeviceDesc = "PCI Kesme Bağlantı Aygıtı" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI Sâbit Husûsîyet Düğmesi" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Ölçünlü CPU'dan PCI'ya Köprü" @@ -674,6 +688,7 @@ GenericMfg = "(Стандартні системні пристрої)" *PNP0C0D.DeviceDesc = "Кришка ACPI" *PNP0C0E.DeviceDesc = "Кнопка сплячого режиму ACPI" *PNP0C0F.DeviceDesc = "Контроллер переривань PCI" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "Кнопка фіксованої можливості ACPI" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Стандартний міст CPU на PCI" @@ -711,6 +726,7 @@ GenericMfg = "(Standartiniai sisteminiai įrenginiai)" *PNP0C0D.DeviceDesc = "ACPI dangtis" *PNP0C0E.DeviceDesc = "ACPI miego mygtukas" *PNP0C0F.DeviceDesc = "PCI pertraukimo sąsajos įrenginys" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI fiksuotos galimybės mygtukas" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "Standartinis CPU į PCI tiltas" @@ -751,6 +767,7 @@ GenericMfg = "(通用系统设备)" *PNP0C0D.DeviceDesc = "ACPI 盖子" *PNP0C0E.DeviceDesc = "ACPI 休眠按钮设备" *PNP0C0F.DeviceDesc = "PCI 中断链接设备" +*PNP0C15.DeviceDesc = "Docking Station" ACPI\FixedButton.DeviceDesc = "ACPI 固定功能按钮" PCI\CC_0500.DeviceDesc = "Standard PCI RAM controller" PCI\CC_0600.DeviceDesc = "标准 CPU - PCI 桥"
5 years, 1 month
1
0
0
0
[reactos] 03/03: WIP
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8cfd5c601f354625a11ee…
commit 8cfd5c601f354625a11ee097984cda0c90f93889 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Jul 13 15:28:44 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Nov 24 18:26:19 2019 +0100 WIP --- ntoskrnl/mm/ARM3/expool.c | 3 +++ ntoskrnl/mm/ARM3/pool.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index 00c68f4ab19..bbf6e407f09 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -2016,6 +2016,9 @@ ExAllocatePoolWithTag( Tag = ' GIB'; } ExpInsertPoolTracker(Tag, ROUND_TO_PAGES(NumberOfBytes), OriginalType); +#if DBG + RtlFillMemory(Allocation, NumberOfBytes, 0xCD); +#endif return Allocation; } diff --git a/ntoskrnl/mm/ARM3/pool.c b/ntoskrnl/mm/ARM3/pool.c index 995b0ce6347..afafcf823ec 100644 --- a/ntoskrnl/mm/ARM3/pool.c +++ b/ntoskrnl/mm/ARM3/pool.c @@ -666,7 +666,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // Return the allocation address to the caller // #if DBG - RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); + RtlFillMemoryUlong(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xABABABAB); #endif return BaseVa; } @@ -680,7 +680,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, if (BaseVa) { #if DBG - RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); + RtlFillMemoryUlong(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xABABABAB); #endif return BaseVa; } @@ -812,7 +812,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // KeReleaseQueuedSpinLock(LockQueueMmNonPagedPoolLock, OldIrql); #if DBG - RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); + RtlFillMemoryUlong(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xABABABAB); #endif return BaseVa; } @@ -911,7 +911,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // BaseVa = MiPteToAddress(StartPte); #if DBG - RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); + RtlFillMemoryUlong(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xABABABAB); #endif return BaseVa; }
5 years, 1 month
1
0
0
0
[reactos] 02/03: [NTOS] Add compile time option to trace callers of pool allocations
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b20755040754506f3f12…
commit 8b20755040754506f3f12a30857f8edc5bf83f33 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Thu Mar 8 12:25:19 2018 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Nov 24 18:26:19 2019 +0100 [NTOS] Add compile time option to trace callers of pool allocations --- ntoskrnl/mm/ARM3/expool.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index 647a4d15681..00c68f4ab19 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -22,6 +22,10 @@ #define POOL_BIG_TABLE_ENTRY_FREE 0x1 +/* DEBUGGING ******************************************************************/ + +//#define DBG_NUMBER_OF_FRAMES_TO_CAPTURE 5 + typedef struct _POOL_DPC_CONTEXT { PPOOL_TRACKER_TABLE PoolTrackTable; @@ -1847,9 +1851,14 @@ ExReturnPoolQuota(IN PVOID P) */ PVOID NTAPI -ExAllocatePoolWithTag(IN POOL_TYPE PoolType, - IN SIZE_T NumberOfBytes, - IN ULONG Tag) +#ifdef DBG_NUMBER_OF_FRAMES_TO_CAPTURE +ExAllocatePoolWithTagInternal( +#else +ExAllocatePoolWithTag( +#endif + _In_ POOL_TYPE PoolType, + _In_ SIZE_T NumberOfBytes, + _In_ ULONG Tag) { PPOOL_DESCRIPTOR PoolDesc; PLIST_ENTRY ListHead; @@ -2417,6 +2426,33 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, return Allocation; } +#ifdef DBG_NUMBER_OF_FRAMES_TO_CAPTURE +PVOID +NTAPI +ExAllocatePoolWithTag( + _In_ POOL_TYPE PoolType, + _In_ SIZE_T NumberOfBytes, + _In_ ULONG Tag) +{ + SIZE_T FullSize; + PVOID Allocation, *DbgData; + + /* Allocate a larger chunk to add the debug data */ + FullSize = NumberOfBytes + (DBG_NUMBER_OF_FRAMES_TO_CAPTURE + 2) * sizeof(PVOID); + Allocation = ExAllocatePoolWithTagInternal(PoolType, FullSize, Tag); + if (Allocation == NULL) + { + return NULL; + } + + /* Append the debug data, separated by a '####' */ + DbgData = ALIGN_UP_POINTER_BY((PUCHAR)Allocation + NumberOfBytes, sizeof(PVOID)); + DbgData[0] = (PVOID)(ULONG_PTR)'####'; + RtlWalkFrameChain(&DbgData[1], DBG_NUMBER_OF_FRAMES_TO_CAPTURE, 0); + return Allocation; +} +#endif + /* * @implemented */
5 years, 1 month
1
0
0
0
[reactos] 01/03: [NTOS] On DBG builds, fill pool allocations with 0xCD and freed pool with 0xDD
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=24f240be8a5f7b09a0c12…
commit 24f240be8a5f7b09a0c122f40384fc63576accfa Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Jun 29 12:06:04 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Nov 24 18:26:19 2019 +0100 [NTOS] On DBG builds, fill pool allocations with 0xCD and freed pool with 0xDD This matches what the MSVC runtime does with heap allocations on debug builds. --- ntoskrnl/mm/ARM3/expool.c | 42 ++++++++++++++++++++++++++++++++---------- ntoskrnl/mm/ARM3/pool.c | 20 ++++++++++++++++++-- 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index bccb0e9bbdd..647a4d15681 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -1859,6 +1859,7 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, ULONG OriginalType; PKPRCB Prcb = KeGetCurrentPrcb(); PGENERAL_LOOKASIDE LookasideList; + PVOID Allocation; // // Some sanity checks @@ -1898,10 +1899,13 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, if (MmUseSpecialPool(NumberOfBytes, Tag)) { // - // Try to allocate using special pool + // Try to allocate using special pool (initialized with random byte) // - Entry = MmAllocateSpecialPool(NumberOfBytes, Tag, PoolType, 2); - if (Entry) return Entry; + Allocation = MmAllocateSpecialPool(NumberOfBytes, Tag, PoolType, 2); + if (Allocation != NULL) + { + return Allocation; + } } } } @@ -1922,8 +1926,8 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, // // Allocate pages for it // - Entry = MiAllocatePoolPages(OriginalType, NumberOfBytes); - if (!Entry) + Allocation = MiAllocatePoolPages(OriginalType, NumberOfBytes); + if (Allocation == NULL) { #if DBG // @@ -1995,7 +1999,7 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, // Add a tag for the big page allocation and switch to the generic "BIG" // tag if we failed to do so, then insert a tracker for this alloation. // - if (!ExpAddTagForBigPages(Entry, + if (!ExpAddTagForBigPages(Allocation, Tag, (ULONG)BYTES_TO_PAGES(NumberOfBytes), OriginalType)) @@ -2003,7 +2007,7 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, Tag = ' GIB'; } ExpInsertPoolTracker(Tag, ROUND_TO_PAGES(NumberOfBytes), OriginalType); - return Entry; + return Allocation; } // @@ -2073,7 +2077,11 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, Entry->PoolTag = Tag; (POOL_FREE_BLOCK(Entry))->Flink = NULL; (POOL_FREE_BLOCK(Entry))->Blink = NULL; - return POOL_FREE_BLOCK(Entry); + Allocation = POOL_FREE_BLOCK(Entry); +#if DBG + RtlFillMemory(Allocation, NumberOfBytes, 0xCD); +#endif + return Allocation; } } @@ -2257,7 +2265,11 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, Entry->PoolTag = Tag; (POOL_FREE_BLOCK(Entry))->Flink = NULL; (POOL_FREE_BLOCK(Entry))->Blink = NULL; - return POOL_FREE_BLOCK(Entry); + Allocation = POOL_FREE_BLOCK(Entry); +#if DBG + RtlFillMemory(Allocation, NumberOfBytes, 0xCD); +#endif + return Allocation; } } while (++ListHead != &PoolDesc->ListHeads[POOL_LISTS_PER_PAGE]); @@ -2400,7 +2412,9 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, // ExpCheckPoolBlocks(Entry); Entry->PoolTag = Tag; - return POOL_FREE_BLOCK(Entry); + Allocation = POOL_FREE_BLOCK(Entry); + + return Allocation; } /* @@ -2544,6 +2558,10 @@ ExFreePoolWithTag(IN PVOID P, Tag &= ~PROTECTED_POOL; } +#if DBG + RtlFillMemory(P, PageCount * PAGE_SIZE, 0xDD); +#endif + // // Check block tag // @@ -2669,6 +2687,10 @@ ExFreePoolWithTag(IN PVOID P, } } +#if DBG + RtlFillMemory(P, BlockSize * POOL_BLOCK_SIZE - sizeof(*Entry), 0xDD); +#endif + // // Is this allocation small enough to have come from a lookaside list? // diff --git a/ntoskrnl/mm/ARM3/pool.c b/ntoskrnl/mm/ARM3/pool.c index 5d6554bad75..995b0ce6347 100644 --- a/ntoskrnl/mm/ARM3/pool.c +++ b/ntoskrnl/mm/ARM3/pool.c @@ -665,6 +665,9 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // // Return the allocation address to the caller // +#if DBG + RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); +#endif return BaseVa; } @@ -674,7 +677,13 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, if ((SizeInPages == 1) && (ExQueryDepthSList(&MiNonPagedPoolSListHead))) { BaseVa = InterlockedPopEntrySList(&MiNonPagedPoolSListHead); - if (BaseVa) return BaseVa; + if (BaseVa) + { +#if DBG + RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); +#endif + return BaseVa; + } } // @@ -802,6 +811,9 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // Release the nonpaged pool lock, and return the allocation // KeReleaseQueuedSpinLock(LockQueueMmNonPagedPoolLock, OldIrql); +#if DBG + RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); +#endif return BaseVa; } @@ -897,7 +909,11 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // // Return the address // - return MiPteToAddress(StartPte); + BaseVa = MiPteToAddress(StartPte); +#if DBG + RtlFillMemory(BaseVa, ROUND_TO_PAGES(SizeInBytes), 0xCD); +#endif + return BaseVa; } ULONG
5 years, 1 month
1
0
0
0
[reactos] 01/01: [SHELL32_APITEST] DragDrop: Add NULL check of pDropTarget
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=14478887df3ce4166bf0d…
commit 14478887df3ce4166bf0dd384071cb9ed9bb9d03 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Nov 24 22:48:06 2019 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Nov 24 22:48:15 2019 +0900 [SHELL32_APITEST] DragDrop: Add NULL check of pDropTarget --- modules/rostests/apitests/shell32/DragDrop.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/rostests/apitests/shell32/DragDrop.cpp b/modules/rostests/apitests/shell32/DragDrop.cpp index 8e35834490f..c292353d86a 100644 --- a/modules/rostests/apitests/shell32/DragDrop.cpp +++ b/modules/rostests/apitests/shell32/DragDrop.cpp @@ -272,6 +272,19 @@ static void DoTestEntry(const TEST_ENTRY *pEntry) CoTaskMemFree(pidl); ok_long(hr, S_OK); + if (!pDropTarget) + { + skip("pDropTarget was NULL\n"); + + // clean up + DeleteFileW(s_szSrcTestFile); + DeleteFileW(s_szDestTestFile); + DoDeleteSpecW(s_szDestLinkSpec); + ILFree(pidlDesktop); + + return; + } + // DragEnter POINTL ptl = { 0, 0 }; DWORD dwKeyState = pEntry->dwKeyState;
5 years, 1 month
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
33
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
Results per page:
10
25
50
100
200