summaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-11-15 01:11:23 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-24 05:16:40 -0500
commite0eb093e794452791b0f932a0120f410f614ad82 (patch)
tree598ab3c7b9f2d179e3b3c318cc0619e304c2bd5f /net/sctp/socket.c
parent8feb2fb2bb986c533e18037d3c45a5f779421992 (diff)
switch sctp_user_addto_chunk() and sctp_datamsg_from_user() to passing iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 85e0b653edd7..0397ac9fd98c 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1609,6 +1609,9 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
__u16 sinfo_flags = 0;
long timeo;
int err;
+ struct iov_iter from;
+
+ iov_iter_init(&from, WRITE, msg->msg_iov, msg->msg_iovlen, msg_len);
err = 0;
sp = sctp_sk(sk);
@@ -1947,7 +1950,7 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
}
/* Break the message into multiple chunks of maximum size. */
- datamsg = sctp_datamsg_from_user(asoc, sinfo, msg, msg_len);
+ datamsg = sctp_datamsg_from_user(asoc, sinfo, &from);
if (IS_ERR(datamsg)) {
err = PTR_ERR(datamsg);
goto out_free;