kernel/vm: Disable mlock implementation, it's broken.

Change-Id: If9e962685c3a363ef05ea3771ef6cafd87540e2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5165
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
Augustin Cavalier 2022-03-29 17:33:18 -04:00 committed by Alex von Gluck IV
parent 6397752c67
commit 0e96df5264

View File

@ -6954,6 +6954,11 @@ struct LockedPages : DoublyLinkedListLinkImpl<LockedPages> {
status_t
_user_mlock(const void* address, size_t size) {
#if 1
// This implementation is broken and cause panics.
// Disable for now.
return B_NOT_SUPPORTED;
#else
// Maybe there's nothing to do, in which case, do nothing
if (size == 0)
return B_OK;
@ -7073,11 +7078,15 @@ _user_mlock(const void* address, size_t size) {
// Finally, store the new range in the locked list
lockedPages->InsertBefore(currentRange, newRange);
return B_OK;
#endif
}
status_t
_user_munlock(const void* address, size_t size) {
#if 1
return B_NOT_SUPPORTED;
#else
// Maybe there's nothing to do, in which case, do nothing
if (size == 0)
return B_OK;
@ -7163,6 +7172,7 @@ _user_munlock(const void* address, size_t size) {
}
return B_OK;
#endif
}