From 3b6d4dbf09d12fdef8c8388962ae9a2da6890a47 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 17 Feb 2017 23:17:41 -0500 Subject: [PATCH] sctp: switch to copy_from_iter_full() Signed-off-by: Al Viro --- net/sctp/sm_make_chunk.c | 4 +--- 1 file changed, 1 insertion(+), 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, struct iov_iter *from) { void *target; - ssize_t copied; /* Make room in chunk for data. */ target = skb_put(chunk->skb, len); /* Copy data (whole iovec) into chunk */ - copied = copy_from_iter(target, len, from); - if (copied != len) + if (!copy_from_iter_full(target, len, from)) return -EFAULT; /* Adjust the chunk length field. */