Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2005 21:50:35 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 80053 for review
Message-ID:  <200507122150.j6CLoZsa097061@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507122150.j6CLoZsa097061>