]> Git Repo - linux.git/blobdiff - net/ipv6/raw.c
x86: clean up/fix 'copy_in_user()' tail zeroing
[linux.git] / net / ipv6 / raw.c
index ee25631f8c293db3db95a0992fa2b319872afb30..dae7f1a1e46481d72e5b61da3cc9990d03c36380 100644 (file)
@@ -609,7 +609,7 @@ out:
        return err;
 }
 
-static int rawv6_send_hdrinc(struct sock *sk, void *from, int length,
+static int rawv6_send_hdrinc(struct sock *sk, struct msghdr *msg, int length,
                        struct flowi6 *fl6, struct dst_entry **dstp,
                        unsigned int flags)
 {
@@ -648,7 +648,7 @@ static int rawv6_send_hdrinc(struct sock *sk, void *from, int length,
        skb->ip_summed = CHECKSUM_NONE;
 
        skb->transport_header = skb->network_header;
-       err = memcpy_fromiovecend((void *)iph, from, 0, length);
+       err = memcpy_from_msg(iph, msg, length);
        if (err)
                goto error_fault;
 
@@ -886,8 +886,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
 
 back_from_confirm:
        if (inet->hdrincl)
-               /* XXX: stripping const */
-               err = rawv6_send_hdrinc(sk, (struct iovec *)msg->msg_iter.iov, len, &fl6, &dst, msg->msg_flags);
+               err = rawv6_send_hdrinc(sk, msg, len, &fl6, &dst, msg->msg_flags);
        else {
                lock_sock(sk);
                err = ip6_append_data(sk, raw6_getfrag, &rfv,
This page took 0.032283 seconds and 4 git commands to generate.