PERFORCE change 80053 for review
Peter Wemm
peter at FreeBSD.org
Tue Jul 12 21:50:37 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=80053
Change 80053 by peter at 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);
More information about the p4-projects
mailing list