Author: tkreuzer
Date: Sun Aug 29 08:35:54 2010
New Revision: 48642
URL: http://svn.reactos.org/svn/reactos?rev=48642&view=rev
Log:
[NTOSKRNL]
Modified version of r48640:
- update the NodeHint to the root node when deleting a node
- remove this code from MmCleanProcessAddressSpace
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Sun Aug 29 08:35:54 2010
@@ -1164,18 +1164,9 @@
/* Remove this VAD from the tree */
ASSERT(VadTree->NumberGenericTableElements >= 1);
- DPRINT("Removing node for VAD: %lx %lx\n", Vad->StartingVpn, Vad->EndingVpn);
MiRemoveNode((PMMADDRESS_NODE)Vad, VadTree);
DPRINT("Moving on: %d\n", VadTree->NumberGenericTableElements);
- /* Check if this VAD was the hint */
- if (VadTree->NodeHint == Vad)
- {
- /* Get a new hint, unless we're empty now, in which case nothing */
- VadTree->NodeHint = VadTree->BalancedRoot.RightChild;
- if (!VadTree->NumberGenericTableElements) VadTree->NodeHint = NULL;
- }
-
/* Only PEB/TEB VADs supported for now */
ASSERT(Vad->u.VadFlags.PrivateMemory == 1);
ASSERT(Vad->u.VadFlags.VadType == VadNone);
Modified: trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] Sun Aug 29 08:35:54 2010
@@ -108,11 +108,21 @@
MiRemoveNode(IN PMMADDRESS_NODE Node,
IN PMM_AVL_TABLE Table)
{
+ DPRINT("Removing address node: %lx %lx\n", Node->StartingVpn, Node->EndingVpn);
+
/* Call the AVL code */
RtlpDeleteAvlTreeNode(Table, Node);
/* Decrease element count */
Table->NumberGenericTableElements--;
+
+ /* Check if this node was the hint */
+ if (Table->NodeHint == Node)
+ {
+ /* Get a new hint, unless we're empty now, in which case nothing */
+ if (!Table->NumberGenericTableElements) Table->NodeHint = NULL;
+ else Table->NodeHint = Table->BalancedRoot.RightChild;
+ }
}
PMMADDRESS_NODE
Author: mjmartin
Date: Sun Aug 29 07:00:52 2010
New Revision: 48640
URL: http://svn.reactos.org/svn/reactos?rev=48640&view=rev
Log:
[ntoskrnl]
- When a node is removed, check the NodeHint of the table to see if it matches the one being removed. If so update the NodeHint to the PreviousNode. FIxes VAD corruption messages.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] Sun Aug 29 07:00:52 2010
@@ -108,6 +108,11 @@
MiRemoveNode(IN PMMADDRESS_NODE Node,
IN PMM_AVL_TABLE Table)
{
+ if (Table->NodeHint == Node)
+ {
+ Table->NodeHint = MiGetPreviousNode(Table->NodeHint);
+ }
+
/* Call the AVL code */
RtlpDeleteAvlTreeNode(Table, Node);
Author: mjmartin
Date: Sat Aug 28 23:55:27 2010
New Revision: 48636
URL: http://svn.reactos.org/svn/reactos?rev=48636&view=rev
Log:
[win32k]
- Mouse messages can be sent before the desktop is initialized. Check for this and return false if its not. FIxes assert when moving mouse before desktop is up.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Sat Aug 28 23:55:27 2010
@@ -350,6 +350,10 @@
PWINDOW_OBJECT CaptureWindow = NULL;
HWND hCaptureWin;
+ /* FIXME: Mouse message can be sent before the Desktop is up and running in which case ScopeWin (Desktop) is 0.
+ Is this the best fix? */
+ if (ScopeWin == 0) return FALSE;
+
ASSERT_REFS_CO(ScopeWin);
/*
Author: mjmartin
Date: Sat Aug 28 23:23:43 2010
New Revision: 48635
URL: http://svn.reactos.org/svn/reactos?rev=48635&view=rev
Log:
[input/i8042prt]
- Fix a check when queuing the mouse packet. Check that the buffer size (MouseInBuffer) is not greater or equal to MouseDataQueueSize. Fixes a NonPagedPool corruption that occurs when the mouse is moved before the desktop window is up and running.
Modified:
trunk/reactos/drivers/input/i8042prt/mouse.c
Modified: trunk/reactos/drivers/input/i8042prt/mouse.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/mou…
==============================================================================
--- trunk/reactos/drivers/input/i8042prt/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/input/i8042prt/mouse.c [iso-8859-1] Sat Aug 28 23:23:43 2010
@@ -49,7 +49,7 @@
DeviceExtension->MouseComplete = TRUE;
DeviceExtension->MouseInBuffer++;
- if (DeviceExtension->MouseInBuffer > DeviceExtension->Common.PortDeviceExtension->Settings.MouseDataQueueSize)
+ if (DeviceExtension->MouseInBuffer >= DeviceExtension->Common.PortDeviceExtension->Settings.MouseDataQueueSize)
{
WARN_(I8042PRT, "Mouse buffer overflow\n");
DeviceExtension->MouseInBuffer--;