projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5a4b0b
)
ppp_read(): switch to skb_copy_datagram_iter()
author
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 24 Nov 2014 22:48:04 +0000
(17:48 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 9 Dec 2014 21:29:10 +0000
(16:29 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/net/ppp/ppp_generic.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/ppp/ppp_generic.c
b/drivers/net/ppp/ppp_generic.c
index 794a4732936883c662212e0769e62993e67d96b0..af034dba9bd62a693ba81dd04479cd11ffc7f10e 100644
(file)
--- 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,
ssize_t ret;
struct sk_buff *skb = NULL;
struct iovec iov;
+ struct iov_iter to;
ret = count;
@@
-462,7
+463,8
@@
static ssize_t ppp_read(struct file *file, char __user *buf,
ret = -EFAULT;
iov.iov_base = buf;
iov.iov_len = count;
- if (skb_copy_datagram_iovec(skb, 0, &iov, skb->len))
+ iov_iter_init(&to, READ, &iov, 1, count);
+ if (skb_copy_datagram_iter(skb, 0, &to, skb->len))
goto outf;
ret = skb->len;