[ros-diffs] [zguo] 55388: Merge in r55173 as per Amine's request. Also apply Cameron's patch that attempts to hack around the memory manager bug.

zguo at svn.reactos.org zguo at svn.reactos.org
Fri Feb 3 03:52:00 UTC 2012


Author: zguo
Date: Fri Feb  3 03:51:58 2012
New Revision: 55388

URL: http://svn.reactos.org/svn/reactos?rev=55388&view=rev
Log:
Merge in r55173 as per Amine's request.  Also apply Cameron's patch that attempts to hack around the memory manager bug.

Modified:
    branches/ros-branch-0_3_14/   (props changed)
    branches/ros-branch-0_3_14/boot/freeldr/freeldr/arch/i386/hardware.c
    branches/ros-branch-0_3_14/ntoskrnl/include/internal/i386/ke.h

Propchange: branches/ros-branch-0_3_14/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb  3 03:51:58 2012
@@ -11,4 +11,4 @@
 /branches/shell32_new-bringup:51893-53652,53661,53700
 /branches/tcp-rewrite-branch:48720,48840-48841,49424-49426,49454
 /branches/wlan-bringup:54809-54998
-/trunk/reactos:55012
+/trunk/reactos:55012,55173

Modified: branches/ros-branch-0_3_14/boot/freeldr/freeldr/arch/i386/hardware.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_14/boot/freeldr/freeldr/arch/i386/hardware.c?rev=55388&r1=55387&r2=55388&view=diff
==============================================================================
--- branches/ros-branch-0_3_14/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original)
+++ branches/ros-branch-0_3_14/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Fri Feb  3 03:51:58 2012
@@ -250,7 +250,8 @@
   TRACE("Estimated buffer size %u\n", NodeSize * NodeCount);
 
     /* Set 'Configuration Data' value */
-  Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + (NodeSize * NodeCount);
+  Size = sizeof(CM_PARTIAL_RESOURCE_LIST)
+        + sizeof(CM_PNP_BIOS_INSTALLATION_CHECK) + (NodeSize * NodeCount);
   PartialResourceList = MmHeapAlloc(Size);
   if (PartialResourceList == NULL)
     {
@@ -268,8 +269,8 @@
   PartialResourceList->PartialDescriptors[0].ShareDisposition =
     CmResourceShareUndetermined;
 
-  Ptr = (char *)(((ULONG_PTR)&PartialResourceList->PartialDescriptors[0]) +
-		 sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
+  /* The buffer starts after PartialResourceList->PartialDescriptors[0] */
+  Ptr = (char *)(PartialResourceList + 1);
 
   /* Set instalation check data */
   memcpy (Ptr, InstData, sizeof(CM_PNP_BIOS_INSTALLATION_CHECK));
@@ -291,6 +292,12 @@
 		    DeviceNode->Node,
 		    DeviceNode->Size,
 		    DeviceNode->Size);
+
+      if (PnpBufferSize + DeviceNode->Size > Size)
+      {
+          ERR("Buffer too small!\n");
+          break;
+      }
 
 	  memcpy (Ptr,
 		  DeviceNode,

Modified: branches/ros-branch-0_3_14/ntoskrnl/include/internal/i386/ke.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_14/ntoskrnl/include/internal/i386/ke.h?rev=55388&r1=55387&r2=55388&view=diff
==============================================================================
--- branches/ros-branch-0_3_14/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original)
+++ branches/ros-branch-0_3_14/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Fri Feb  3 03:51:58 2012
@@ -243,8 +243,8 @@
 VOID
 KeInvalidateTlbEntry(IN PVOID Address)
 {
-    /* Invalidate the TLB entry for this address */
-    __invlpg(Address);
+    /* HACK: Flush the entire TLB */
+    __writecr3(__readcr3());
 }
 
 FORCEINLINE




More information about the Ros-diffs mailing list