diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 17:48:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-09 16:29:10 -0500 |
commit | ba5684083c7b35e492dd856be2f9724b0efea416 (patch) | |
tree | 4c60d53dad39f3f962cd1102cacb5702094faca7 | |
parent | e5a4b0bb803b39a36478451eae53a880d2663d5b (diff) |
ppp_read(): switch to skb_copy_datagram_iter()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 794a47329368..af034dba9bd6 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -417,6 +417,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf, | |||
417 | ssize_t ret; | 417 | ssize_t ret; |
418 | struct sk_buff *skb = NULL; | 418 | struct sk_buff *skb = NULL; |
419 | struct iovec iov; | 419 | struct iovec iov; |
420 | struct iov_iter to; | ||
420 | 421 | ||
421 | ret = count; | 422 | ret = count; |
422 | 423 | ||
@@ -462,7 +463,8 @@ static ssize_t ppp_read(struct file *file, char __user *buf, | |||
462 | ret = -EFAULT; | 463 | ret = -EFAULT; |
463 | iov.iov_base = buf; | 464 | iov.iov_base = buf; |
464 | iov.iov_len = count; | 465 | iov.iov_len = count; |
465 | if (skb_copy_datagram_iovec(skb, 0, &iov, skb->len)) | 466 | iov_iter_init(&to, READ, &iov, 1, count); |
467 | if (skb_copy_datagram_iter(skb, 0, &to, skb->len)) | ||
466 | goto outf; | 468 | goto outf; |
467 | ret = skb->len; | 469 | ret = skb->len; |
468 | 470 | ||