kernel: vm: allow mmapping of the last page of the userspace.

This commit is contained in:
Jérôme Duval 2018-01-27 17:01:53 +01:00
parent 3bcf027203
commit 1603eec4a4

View File

@ -6402,7 +6402,7 @@ _user_map_file(const char* userName, void** userAddress, uint32 addressSpec,
return B_BAD_VALUE;
}
if (!IS_USER_ADDRESS(address)
|| !IS_USER_ADDRESS((addr_t)address + size)) {
|| !IS_USER_ADDRESS((addr_t)address + size - 1)) {
return B_BAD_ADDRESS;
}
}