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
Kirill Smelkov
linux
Commits
f9280acd
Commit
f9280acd
authored
Jun 03, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: vlan annotation
parent
eb3119f9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
include/linux/if_vlan.h
include/linux/if_vlan.h
+1
-1
net/8021q/vlan.c
net/8021q/vlan.c
+4
-5
net/socket.c
net/socket.c
+3
-3
No files found.
include/linux/if_vlan.h
View file @
f9280acd
...
...
@@ -55,7 +55,7 @@ struct vlan_hdr {
#define VLAN_VID_MASK 0xfff
/* found in socket.c */
extern
void
vlan_ioctl_set
(
int
(
*
hook
)(
unsigned
long
));
extern
void
vlan_ioctl_set
(
int
(
*
hook
)(
void
__user
*
));
#define VLAN_NAME "vlan"
...
...
net/8021q/vlan.c
View file @
f9280acd
...
...
@@ -49,7 +49,7 @@ static char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
static
char
vlan_buggyright
[]
=
"David S. Miller <davem@redhat.com>"
;
static
int
vlan_device_event
(
struct
notifier_block
*
,
unsigned
long
,
void
*
);
static
int
vlan_ioctl_handler
(
unsigned
long
);
static
int
vlan_ioctl_handler
(
void
__user
*
);
static
int
unregister_vlan_dev
(
struct
net_device
*
,
unsigned
short
);
struct
notifier_block
vlan_notifier_block
=
{
...
...
@@ -661,9 +661,9 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
/*
* VLAN IOCTL handler.
* o execute requested action or pass command to the device driver
* arg is really a
void* to a vlan_ioctl_args structure
.
* arg is really a
struct vlan_ioctl_args __user *
.
*/
static
int
vlan_ioctl_handler
(
unsigned
long
arg
)
static
int
vlan_ioctl_handler
(
void
__user
*
arg
)
{
int
err
=
0
;
struct
vlan_ioctl_args
args
;
...
...
@@ -675,8 +675,7 @@ static int vlan_ioctl_handler(unsigned long arg)
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EPERM
;
if
(
copy_from_user
(
&
args
,
(
void
*
)
arg
,
sizeof
(
struct
vlan_ioctl_args
)))
if
(
copy_from_user
(
&
args
,
arg
,
sizeof
(
struct
vlan_ioctl_args
)))
return
-
EFAULT
;
/* Null terminate this sucker, just in case. */
...
...
net/socket.c
View file @
f9280acd
...
...
@@ -740,9 +740,9 @@ void brioctl_set(int (*hook)(unsigned int, void __user *))
EXPORT_SYMBOL
(
brioctl_set
);
static
DECLARE_MUTEX
(
vlan_ioctl_mutex
);
static
int
(
*
vlan_ioctl_hook
)(
unsigned
long
arg
);
static
int
(
*
vlan_ioctl_hook
)(
void
__user
*
arg
);
void
vlan_ioctl_set
(
int
(
*
hook
)(
unsigned
long
))
void
vlan_ioctl_set
(
int
(
*
hook
)(
void
__user
*
))
{
down
(
&
vlan_ioctl_mutex
);
vlan_ioctl_hook
=
hook
;
...
...
@@ -816,7 +816,7 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
down
(
&
vlan_ioctl_mutex
);
if
(
vlan_ioctl_hook
)
err
=
vlan_ioctl_hook
(
arg
);
err
=
vlan_ioctl_hook
(
arg
p
);
up
(
&
vlan_ioctl_mutex
);
break
;
case
SIOCGIFDIVERT
:
...
...
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