mirror of
https://github.com/reactos/reactos.git
synced 2024-07-27 14:49:22 +00:00
- MmMapViewOfSection: Don't forget to unlock the address space before returning -- fixes a bugcheck revealed by kernel32 Winetest "virtual"
svn path=/trunk/; revision=37064
This commit is contained in:
parent
40944938d8
commit
1e6b6718f3
|
@ -4642,18 +4642,21 @@ MmMapViewOfSection(IN PVOID SectionObject,
|
|||
if ((Protect & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE)) &&
|
||||
!(Section->SectionPageProtection & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE)))
|
||||
{
|
||||
MmUnlockAddressSpace(AddressSpace);
|
||||
return STATUS_SECTION_PROTECTION;
|
||||
}
|
||||
/* check for read access */
|
||||
if ((Protect & (PAGE_READONLY|PAGE_WRITECOPY|PAGE_EXECUTE_READ|PAGE_EXECUTE_WRITECOPY)) &&
|
||||
!(Section->SectionPageProtection & (PAGE_READONLY|PAGE_READWRITE|PAGE_WRITECOPY|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY)))
|
||||
{
|
||||
MmUnlockAddressSpace(AddressSpace);
|
||||
return STATUS_SECTION_PROTECTION;
|
||||
}
|
||||
/* check for execute access */
|
||||
if ((Protect & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY)) &&
|
||||
!(Section->SectionPageProtection & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY)))
|
||||
{
|
||||
MmUnlockAddressSpace(AddressSpace);
|
||||
return STATUS_SECTION_PROTECTION;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue