mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Fix `fstat -m' (show memory-mapped files), which was broken by
revision 1.25. When evaluating the termination condition for the iteration over all map entries, we must take care to use the kernel versions of all pointers. The code was comparing a kernel pointer to a pointer within a local variable, so the loop never terminated.
This commit is contained in:
parent
7c45cb9bca
commit
b654e1067b
1 changed files with 2 additions and 2 deletions
|
|
@ -393,8 +393,8 @@ dommap(kp)
|
|||
}
|
||||
map = &vmspace.vm_map;
|
||||
|
||||
for (entryp = map->header.next; entryp != &vmspace.vm_map.header;
|
||||
entryp = entry.next) {
|
||||
for (entryp = map->header.next;
|
||||
entryp != &kp->ki_vmspace->vm_map.header; entryp = entry.next) {
|
||||
if (!KVM_READ(entryp, &entry, sizeof(entry))) {
|
||||
dprintf(stderr,
|
||||
"can't read vm_map_entry at %p for pid %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue