Kernel: Add fast path for invalid address during region pin

Before I was falling through to the write lock which does allocation,
but as the read loop already saw, specified address was not mapped.
This commit is contained in:
2026-05-17 00:12:05 +03:00
parent 6e95519acc
commit 9e6fa0a1ba

View File

@@ -3884,6 +3884,8 @@ namespace Kernel
region->pin(); region->pin();
return region.ptr(); return region.ptr();
} }
return BAN::Error::from_errno(EFAULT);
} }
validate_and_pin_pointer_access_with_allocation: validate_and_pin_pointer_access_with_allocation: