From 9d2c48c0e3001b77621a8feacd2712aa617c8643 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sun, 1 Dec 2013 17:29:07 +0000 Subject: [PATCH] Remove unnecessary double-setting of the thread's onfault state in copyinstr(). --- sys/powerpc/powerpc/copyinout.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c index a1c0456494f6..a8108d634a58 100644 --- a/sys/powerpc/powerpc/copyinout.c +++ b/sys/powerpc/powerpc/copyinout.c @@ -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); }