From: Samuel Ortiz Date: Fri, 11 Jan 2013 13:54:22 +0000 (+0100) Subject: NFC: Use skb_copy_datagram_iovec X-Git-Tag: v3.9-rc1~139^2~242^2^2~26^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb97c3e80f99988079df4fb5f3c84aea4e7f806a;p=profile%2Fivi%2Fkernel-x86-ivi.git NFC: Use skb_copy_datagram_iovec Safer and more robust than than memcpy_toiovec. Signed-off-by: Samuel Ortiz --- diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 463231b..5332751 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c @@ -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;