Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ba568408
Commit
ba568408
authored
Nov 24, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppp_read(): switch to skb_copy_datagram_iter()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
e5a4b0bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
drivers/net/ppp/ppp_generic.c
drivers/net/ppp/ppp_generic.c
+3
-1
No files found.
drivers/net/ppp/ppp_generic.c
View file @
ba568408
...
@@ -417,6 +417,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
...
@@ -417,6 +417,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
ssize_t
ret
;
ssize_t
ret
;
struct
sk_buff
*
skb
=
NULL
;
struct
sk_buff
*
skb
=
NULL
;
struct
iovec
iov
;
struct
iovec
iov
;
struct
iov_iter
to
;
ret
=
count
;
ret
=
count
;
...
@@ -462,7 +463,8 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
...
@@ -462,7 +463,8 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
ret
=
-
EFAULT
;
ret
=
-
EFAULT
;
iov
.
iov_base
=
buf
;
iov
.
iov_base
=
buf
;
iov
.
iov_len
=
count
;
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
;
goto
outf
;
ret
=
skb
->
len
;
ret
=
skb
->
len
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment