Changeset 25308 in vbox for trunk/src/VBox/HostDrivers/Support/win
- Timestamp:
- Dec 10, 2009 4:48:49 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55874
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r25300 r25308 614 614 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) 615 615 { 616 pImage->pvNtSectionObj = NULL; 617 pImage->hMemLock = NIL_RTR0MEMOBJ; 618 616 619 #ifdef VBOX_WITHOUT_NATIVE_R0_LOADER 617 620 NOREF(pDevExt); NOREF(pszFilename); NOREF(pImage); … … 663 666 if (pImage->cbImageBits == Info.ImageLength) 664 667 { 665 /** @todo do we need to lock down the image? */ 666 rc = VINF_SUCCESS; 668 /* 669 * Lock down the entire image, just to be on the safe side. 670 */ 671 rc = RTR0MemObjLockKernel(&pImage->hMemLock, pImage->pvImage, pImage->cbImageBits, RTMEM_PROT_READ); 672 if (RT_FAILURE(rc)) 673 { 674 pImage->hMemLock = NIL_RTR0MEMOBJ; 675 supdrvOSLdrUnload(pDevExt, pImage); 676 } 667 677 } 668 678 else … … 752 762 if (pImage->pvNtSectionObj) 753 763 { 764 if (pImage->hMemLock != NIL_RTR0MEMOBJ) 765 { 766 RTR0MemObjFree(pImage->hMemLock, false /*fFreeMappings*/); 767 pImage->hMemLock = NIL_RTR0MEMOBJ; 768 } 769 754 770 NTSTATUS rc = ZwSetSystemInformation(MY_SystemUnloadGdiDriverInformation, 755 771 &pImage->pvNtSectionObj, sizeof(pImage->pvNtSectionObj)); 772 pImage->pvNtSectionObj = NULL; 756 773 } 757 774 NOREF(pDevExt);
Note:
See TracChangeset
for help on using the changeset viewer.