From e0eb093e794452791b0f932a0120f410f614ad82 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 15 Nov 2014 01:11:23 -0500 Subject: switch sctp_user_addto_chunk() and sctp_datamsg_from_user() to passing iov_iter Signed-off-by: Al Viro --- net/sctp/socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/sctp/socket.c') diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 85e0b65..0397ac9 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; -- cgit v1.1