Skip to content

Commit ba56840

Browse files
author
Al Viro
committed
ppp_read(): switch to skb_copy_datagram_iter()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent e5a4b0b commit ba56840

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ppp/ppp_generic.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
417417
ssize_t ret;
418418
struct sk_buff *skb = NULL;
419419
struct iovec iov;
420+
struct iov_iter to;
420421

421422
ret = count;
422423

@@ -462,7 +463,8 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
462463
ret = -EFAULT;
463464
iov.iov_base = buf;
464465
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))
466468
goto outf;
467469
ret = skb->len;
468470

0 commit comments

Comments
 (0)