From 853ca334332eb4312e30de0ff2c59411c35eb418 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 6 May 2024 23:30:05 -0400 Subject: kernel: vm_fault: Fix 'td' assignment Signed-off-by: Ian Moffett --- sys/vm/vm_fault.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index d1a3e29..219db91 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -55,7 +55,7 @@ static struct vm_mapping * vm_find_mapping(vaddr_t addr) { struct vm_mapping *mapping; - struct proc *td; + struct proc *td = this_td(); vm_mapq_t *mapq; mapping = vm_mapping_fetch(&td->mapspace, addr); @@ -63,7 +63,6 @@ vm_find_mapping(vaddr_t addr) return mapping; /* Need to search other maps */ - td = this_td(); for (size_t i = 0; i < MTAB_ENTRIES; ++i) { mapq = &td->mapspace.mtab[i]; mapping = vm_mapq_search(mapq, addr); -- cgit v1.2.3