projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fad2e37
)
NFC: Use skb_copy_datagram_iovec
author
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 11 Jan 2013 13:54:22 +0000
(14:54 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 11 Jan 2013 13:56:32 +0000
(14:56 +0100)
Safer and more robust than than memcpy_toiovec.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp/sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/nfc/llcp/sock.c
b/net/nfc/llcp/sock.c
index 463231bed8d450f5c5e4d13a0fd071b0b50bf31e..5332751943a9ec564befadda63a5a3749d7434c1 100644
(file)
--- 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;