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
e65ca57c
Commit
e65ca57c
authored
Sep 18, 2002
by
Pete Zaitcev
Committed by
David S. Miller
Sep 18, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drivers/net/tun.c: Fix warning and missing overflow check.
parent
9c973589
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
drivers/net/tun.c
drivers/net/tun.c
+3
-1
No files found.
drivers/net/tun.c
View file @
e65ca57c
...
...
@@ -275,7 +275,7 @@ static __inline__ ssize_t tun_put_user(struct tun_struct *tun,
total
+=
sizeof
(
pi
);
}
len
=
min
(
skb
->
len
,
len
);
len
=
min
_t
(
int
,
skb
->
len
,
len
);
skb_copy_datagram_iovec
(
skb
,
0
,
iv
,
len
);
total
+=
len
;
...
...
@@ -306,6 +306,8 @@ static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv,
return
-
EFAULT
;
len
+=
iv
[
i
].
iov_len
;
}
if
(
len
<
0
)
return
-
EINVAL
;
add_wait_queue
(
&
tun
->
read_wait
,
&
wait
);
while
(
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