aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 3f8f17e..d109725 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -56,6 +56,11 @@ unload_td(struct proc *td)
range = &execp->loadmap[i];
len = (range->end - range->start);
+ /* Drop entries with zeroed range */
+ if (range->start == 0 && range->end == 0) {
+ continue;
+ }
+
/* Attempt to unmap the range */
if (vm_unmap(pcbp->addrsp, range->vbase, len) != 0) {
pr_error("Failed to unmap %p - %p (pid=%d)\n",