aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/iovec.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/iovec.c')
-rw-r--r--net/core/iovec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/iovec.c b/net/core/iovec.c
index 40a76ce19d9f..16ad45d4882b 100644
--- a/net/core/iovec.c
+++ b/net/core/iovec.c
@@ -112,9 +112,9 @@ int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata,
112 continue; 112 continue;
113 } 113 }
114 copy = min_t(unsigned int, iov->iov_len - offset, len); 114 copy = min_t(unsigned int, iov->iov_len - offset, len);
115 offset = 0; 115 if (copy_to_user(iov->iov_base + offset, kdata, copy))
116 if (copy_to_user(iov->iov_base, kdata, copy))
117 return -EFAULT; 116 return -EFAULT;
117 offset = 0;
118 kdata += copy; 118 kdata += copy;
119 len -= copy; 119 len -= copy;
120 } 120 }