From owner-p4-projects@FreeBSD.ORG Tue Jul 12 21:50:36 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CDBDE16A420; Tue, 12 Jul 2005 21:50:35 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B9D716A41C for ; Tue, 12 Jul 2005 21:50:35 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 395E743D45 for ; Tue, 12 Jul 2005 21:50:35 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6CLoZZX097064 for ; Tue, 12 Jul 2005 21:50:35 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6CLoZsa097061 for perforce@freebsd.org; Tue, 12 Jul 2005 21:50:35 GMT (envelope-from peter@freebsd.org) Date: Tue, 12 Jul 2005 21:50:35 GMT Message-Id: <200507122150.j6CLoZsa097061@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 80053 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2005 21:50:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=80053 Change 80053 by peter@peter_melody on 2005/07/12 21:49:47 Don't leave a stray mapping behind in EFAULT error cases. Should be harmless, but there is no need to invite trouble. Unmap at the end rather than in the loop. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/uio_machdep.c#7 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/uio_machdep.c#7 (text+ko) ==== @@ -121,9 +121,6 @@ case UIO_NOCOPY: break; } -#ifdef NODMAP - pmap_qremove(kva, 1); -#endif iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; uio->uio_resid -= cnt; @@ -135,6 +132,7 @@ if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; #ifdef NODMAP + pmap_qremove(kva, 1); kmem_free(kernel_map, kva, PAGE_SIZE); #endif return (error);