Commit 3b6d4dbf authored by Al Viro's avatar Al Viro

sctp: switch to copy_from_iter_full()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 1c512a7c
...@@ -1512,14 +1512,12 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int len, ...@@ -1512,14 +1512,12 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int len,
struct iov_iter *from) struct iov_iter *from)
{ {
void *target; void *target;
ssize_t copied;
/* Make room in chunk for data. */ /* Make room in chunk for data. */
target = skb_put(chunk->skb, len); target = skb_put(chunk->skb, len);
/* Copy data (whole iovec) into chunk */ /* Copy data (whole iovec) into chunk */
copied = copy_from_iter(target, len, from); if (!copy_from_iter_full(target, len, from))
if (copied != len)
return -EFAULT; return -EFAULT;
/* Adjust the chunk length field. */ /* Adjust the chunk length field. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment