Remove unnecessary double-setting of the thread's onfault state in
copyinstr().
This commit is contained in:
parent
3df046183e
commit
9d2c48c0e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258802
@ -250,22 +250,11 @@ copyin(const void *udaddr, void *kaddr, size_t len)
|
||||
int
|
||||
copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done)
|
||||
{
|
||||
struct thread *td;
|
||||
pmap_t pm;
|
||||
faultbuf env;
|
||||
const char *up;
|
||||
char *kp;
|
||||
size_t l;
|
||||
int rv, c;
|
||||
|
||||
td = curthread;
|
||||
pm = &td->td_proc->p_vmspace->vm_pmap;
|
||||
|
||||
if (setfault(env)) {
|
||||
td->td_pcb->pcb_onfault = NULL;
|
||||
return (EFAULT);
|
||||
}
|
||||
|
||||
kp = kaddr;
|
||||
up = udaddr;
|
||||
|
||||
@ -288,7 +277,6 @@ copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done)
|
||||
*done = l;
|
||||
}
|
||||
|
||||
td->td_pcb->pcb_onfault = NULL;
|
||||
return (rv);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user