Commit fb97c3e8 authored by Samuel Ortiz's avatar Samuel Ortiz

NFC: Use skb_copy_datagram_iovec

Safer and more robust than than memcpy_toiovec.
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent fad2e371
......@@ -672,7 +672,7 @@ static int llcp_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
copied = min_t(unsigned int, rlen, len);
cskb = skb;
if (memcpy_toiovec(msg->msg_iov, cskb->data, copied)) {
if (skb_copy_datagram_iovec(cskb, 0, msg->msg_iov, copied)) {
if (!(flags & MSG_PEEK))
skb_queue_head(&sk->sk_receive_queue, skb);
return -EFAULT;
......
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