aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-02-17 23:17:41 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-21 13:57:27 -0400
commit3b6d4dbf09d12fdef8c8388962ae9a2da6890a47 (patch)
treed8bf33cd027432a46aa5854ee928772c0623ddb8 /net
parent1c512a7ca943575a3fbca6d6366d41e5c7c7d539 (diff)
sctp: switch to copy_from_iter_full()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/sm_make_chunk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 118faff6a332..8a08f13469c4 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1512,14 +1512,12 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int len,
1512 struct iov_iter *from) 1512 struct iov_iter *from)
1513{ 1513{
1514 void *target; 1514 void *target;
1515 ssize_t copied;
1516 1515
1517 /* Make room in chunk for data. */ 1516 /* Make room in chunk for data. */
1518 target = skb_put(chunk->skb, len); 1517 target = skb_put(chunk->skb, len);
1519 1518
1520 /* Copy data (whole iovec) into chunk */ 1519 /* Copy data (whole iovec) into chunk */
1521 copied = copy_from_iter(target, len, from); 1520 if (!copy_from_iter_full(target, len, from))
1522 if (copied != len)
1523 return -EFAULT; 1521 return -EFAULT;
1524 1522
1525 /* Adjust the chunk length field. */ 1523 /* Adjust the chunk length field. */