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
96dff59d
Commit
96dff59d
authored
Jun 04, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: drivers/net/tun.c annotation
parent
090014ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/net/tun.c
drivers/net/tun.c
+5
-5
No files found.
drivers/net/tun.c
View file @
96dff59d
...
...
@@ -241,10 +241,10 @@ static ssize_t tun_chr_writev(struct file * file, const struct iovec *iv,
}
/* Write */
static
ssize_t
tun_chr_write
(
struct
file
*
file
,
const
char
*
buf
,
static
ssize_t
tun_chr_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
pos
)
{
struct
iovec
iv
=
{
(
void
*
)
buf
,
count
};
struct
iovec
iv
=
{
(
void
__user
*
)
buf
,
count
};
return
tun_chr_writev
(
file
,
&
iv
,
1
,
pos
);
}
...
...
@@ -333,7 +333,7 @@ static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv,
}
/* Read */
static
ssize_t
tun_chr_read
(
struct
file
*
file
,
char
*
buf
,
static
ssize_t
tun_chr_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
pos
)
{
struct
iovec
iv
=
{
buf
,
count
};
...
...
@@ -462,7 +462,7 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
struct
ifreq
ifr
;
int
err
;
if
(
copy_from_user
(
&
ifr
,
(
void
*
)
arg
,
sizeof
(
ifr
)))
if
(
copy_from_user
(
&
ifr
,
(
void
__user
*
)
arg
,
sizeof
(
ifr
)))
return
-
EFAULT
;
ifr
.
ifr_name
[
IFNAMSIZ
-
1
]
=
'\0'
;
...
...
@@ -473,7 +473,7 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
if
(
err
)
return
err
;
if
(
copy_to_user
((
void
*
)
arg
,
&
ifr
,
sizeof
(
ifr
)))
if
(
copy_to_user
((
void
__user
*
)
arg
,
&
ifr
,
sizeof
(
ifr
)))
return
-
EFAULT
;
return
0
;
}
...
...
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