diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-18 21:08:34 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-18 21:08:34 -0400 |
commit | 71ccd7528fa4380b146e71040d9bc246f8a5d82b (patch) | |
tree | dce01c67383b4b113411cf607c8624ae582547cc /sys/kern/kern_exit.c | |
parent | 4b57a4986725ac5584bb6a7d346dbc83efe2d454 (diff) |
kernel: exit: Drop loadmap entries with bad range
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 5 |
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", |