aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-17 23:47:46 -0400
committerIan Moffett <ian@osmora.org>2024-04-17 23:47:46 -0400
commit8575c3bf131c42841b66aae7acf96b7310524f56 (patch)
tree429b27e242cba70bdcbb3b2a4a3320af2be3faa4 /sys/vm
parentfbbf0fa9a7ce34bc145d6561fa584c2cfb022954 (diff)
kernel: vm_map: Handle pager errors
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 19320cd..e8dc0ed 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -213,7 +213,10 @@ vm_fd_map(void *addr, vm_prot_t prot, size_t len, off_t off, int fd)
}
pg.physaddr = physmem;
- vm_pager_get(vp->vmobj, off, len, &pg);
+
+ if (vm_pager_get(vp->vmobj, off, len, &pg) != 0)
+ return 0;
+
return physmem;
}