summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-02-08 20:19:44 +0000
committertmm <tmm@FreeBSD.org>2002-02-08 20:19:44 +0000
commite5ac0f9e2f68ec9c2797dcd48494b049203e6071 (patch)
tree280eea8346b52f379af26a9ccb8ac57327a16307 /sys
parentf697ae8b94997acf3f1c6dd351a544df2c48d2e3 (diff)
downloadFreeBSD-src-e5ac0f9e2f68ec9c2797dcd48494b049203e6071.zip
FreeBSD-src-e5ac0f9e2f68ec9c2797dcd48494b049203e6071.tar.gz
Fix a bug introduced in r. 1.28: when copy{in,out} would fail for an
iovec that was not the last one in the uio, the error would be ignored silently. Bug found and fix proposed by: jhb
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_subr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 9449192..250077c 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -104,7 +104,7 @@ uiomove(cp, n, uio)
else
error = copyin(iov->iov_base, cp, cnt);
if (error)
- break;
+ goto out;
break;
case UIO_SYSSPACE:
@@ -123,6 +123,7 @@ uiomove(cp, n, uio)
cp += cnt;
n -= cnt;
}
+out:
if (td != curthread) printf("uiomove: IT CHANGED!");
td = curthread; /* Might things have changed in copyin/copyout? */
if (td) {
OpenPOWER on IntegriCloud