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
bd8ef6d3
Commit
bd8ef6d3
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: x25 annotation
parent
6e3a9a7f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
16 deletions
+17
-16
include/net/x25.h
include/net/x25.h
+2
-2
net/x25/af_x25.c
net/x25/af_x25.c
+13
-12
net/x25/x25_link.c
net/x25/x25_link.c
+1
-1
net/x25/x25_route.c
net/x25/x25_route.c
+1
-1
No files found.
include/net/x25.h
View file @
bd8ef6d3
...
@@ -196,7 +196,7 @@ extern void x25_transmit_restart_confirmation(struct x25_neigh *);
...
@@ -196,7 +196,7 @@ extern void x25_transmit_restart_confirmation(struct x25_neigh *);
extern
void
x25_transmit_diagnostic
(
struct
x25_neigh
*
,
unsigned
char
);
extern
void
x25_transmit_diagnostic
(
struct
x25_neigh
*
,
unsigned
char
);
extern
void
x25_transmit_clear_request
(
struct
x25_neigh
*
,
unsigned
int
,
unsigned
char
);
extern
void
x25_transmit_clear_request
(
struct
x25_neigh
*
,
unsigned
int
,
unsigned
char
);
extern
void
x25_transmit_link
(
struct
sk_buff
*
,
struct
x25_neigh
*
);
extern
void
x25_transmit_link
(
struct
sk_buff
*
,
struct
x25_neigh
*
);
extern
int
x25_subscr_ioctl
(
unsigned
int
,
void
*
);
extern
int
x25_subscr_ioctl
(
unsigned
int
,
void
__user
*
);
extern
struct
x25_neigh
*
x25_get_neigh
(
struct
net_device
*
);
extern
struct
x25_neigh
*
x25_get_neigh
(
struct
net_device
*
);
extern
void
x25_link_free
(
void
);
extern
void
x25_link_free
(
void
);
...
@@ -221,7 +221,7 @@ extern void x25_enquiry_response(struct sock *);
...
@@ -221,7 +221,7 @@ extern void x25_enquiry_response(struct sock *);
extern
struct
x25_route
*
x25_get_route
(
struct
x25_address
*
addr
);
extern
struct
x25_route
*
x25_get_route
(
struct
x25_address
*
addr
);
extern
struct
net_device
*
x25_dev_get
(
char
*
);
extern
struct
net_device
*
x25_dev_get
(
char
*
);
extern
void
x25_route_device_down
(
struct
net_device
*
dev
);
extern
void
x25_route_device_down
(
struct
net_device
*
dev
);
extern
int
x25_route_ioctl
(
unsigned
int
,
void
*
);
extern
int
x25_route_ioctl
(
unsigned
int
,
void
__user
*
);
extern
void
x25_route_free
(
void
);
extern
void
x25_route_free
(
void
);
static
__inline__
void
x25_route_hold
(
struct
x25_route
*
rt
)
static
__inline__
void
x25_route_hold
(
struct
x25_route
*
rt
)
...
...
net/x25/af_x25.c
View file @
bd8ef6d3
...
@@ -1180,6 +1180,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1180,6 +1180,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
x25_opt
*
x25
=
x25_sk
(
sk
);
struct
x25_opt
*
x25
=
x25_sk
(
sk
);
void
__user
*
argp
=
(
void
__user
*
)
arg
;
int
rc
;
int
rc
;
switch
(
cmd
)
{
switch
(
cmd
)
{
...
@@ -1188,7 +1189,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1188,7 +1189,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
atomic_read
(
&
sk
->
sk_wmem_alloc
);
atomic_read
(
&
sk
->
sk_wmem_alloc
);
if
(
amount
<
0
)
if
(
amount
<
0
)
amount
=
0
;
amount
=
0
;
rc
=
put_user
(
amount
,
(
unsigned
int
*
)
arg
);
rc
=
put_user
(
amount
,
(
unsigned
int
__user
*
)
argp
);
break
;
break
;
}
}
...
@@ -1201,7 +1202,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1201,7 +1202,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
*/
*/
if
((
skb
=
skb_peek
(
&
sk
->
sk_receive_queue
))
!=
NULL
)
if
((
skb
=
skb_peek
(
&
sk
->
sk_receive_queue
))
!=
NULL
)
amount
=
skb
->
len
;
amount
=
skb
->
len
;
rc
=
put_user
(
amount
,
(
unsigned
int
*
)
arg
);
rc
=
put_user
(
amount
,
(
unsigned
int
__user
*
)
argp
);
break
;
break
;
}
}
...
@@ -1209,7 +1210,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1209,7 +1210,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
rc
=
-
EINVAL
;
rc
=
-
EINVAL
;
if
(
sk
)
if
(
sk
)
rc
=
sock_get_timestamp
(
sk
,
rc
=
sock_get_timestamp
(
sk
,
(
struct
timeval
__user
*
)
arg
);
(
struct
timeval
__user
*
)
arg
p
);
break
;
break
;
case
SIOCGIFADDR
:
case
SIOCGIFADDR
:
case
SIOCSIFADDR
:
case
SIOCSIFADDR
:
...
@@ -1228,20 +1229,20 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1228,20 +1229,20 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
rc
=
-
EPERM
;
rc
=
-
EPERM
;
if
(
!
capable
(
CAP_NET_ADMIN
))
if
(
!
capable
(
CAP_NET_ADMIN
))
break
;
break
;
rc
=
x25_route_ioctl
(
cmd
,
(
void
*
)
arg
);
rc
=
x25_route_ioctl
(
cmd
,
argp
);
break
;
break
;
case
SIOCX25GSUBSCRIP
:
case
SIOCX25GSUBSCRIP
:
rc
=
x25_subscr_ioctl
(
cmd
,
(
void
*
)
arg
);
rc
=
x25_subscr_ioctl
(
cmd
,
argp
);
break
;
break
;
case
SIOCX25SSUBSCRIP
:
case
SIOCX25SSUBSCRIP
:
rc
=
-
EPERM
;
rc
=
-
EPERM
;
if
(
!
capable
(
CAP_NET_ADMIN
))
if
(
!
capable
(
CAP_NET_ADMIN
))
break
;
break
;
rc
=
x25_subscr_ioctl
(
cmd
,
(
void
*
)
arg
);
rc
=
x25_subscr_ioctl
(
cmd
,
argp
);
break
;
break
;
case
SIOCX25GFACILITIES
:
{
case
SIOCX25GFACILITIES
:
{
struct
x25_facilities
fac
=
x25
->
facilities
;
struct
x25_facilities
fac
=
x25
->
facilities
;
rc
=
copy_to_user
(
(
void
*
)
arg
,
&
fac
,
rc
=
copy_to_user
(
argp
,
&
fac
,
sizeof
(
fac
))
?
-
EFAULT
:
0
;
sizeof
(
fac
))
?
-
EFAULT
:
0
;
break
;
break
;
}
}
...
@@ -1249,7 +1250,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1249,7 +1250,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case
SIOCX25SFACILITIES
:
{
case
SIOCX25SFACILITIES
:
{
struct
x25_facilities
facilities
;
struct
x25_facilities
facilities
;
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
if
(
copy_from_user
(
&
facilities
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
facilities
,
argp
,
sizeof
(
facilities
)))
sizeof
(
facilities
)))
break
;
break
;
rc
=
-
EINVAL
;
rc
=
-
EINVAL
;
...
@@ -1277,7 +1278,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1277,7 +1278,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case
SIOCX25GCALLUSERDATA
:
{
case
SIOCX25GCALLUSERDATA
:
{
struct
x25_calluserdata
cud
=
x25
->
calluserdata
;
struct
x25_calluserdata
cud
=
x25
->
calluserdata
;
rc
=
copy_to_user
(
(
void
*
)
arg
,
&
cud
,
rc
=
copy_to_user
(
argp
,
&
cud
,
sizeof
(
cud
))
?
-
EFAULT
:
0
;
sizeof
(
cud
))
?
-
EFAULT
:
0
;
break
;
break
;
}
}
...
@@ -1286,7 +1287,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1286,7 +1287,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
struct
x25_calluserdata
calluserdata
;
struct
x25_calluserdata
calluserdata
;
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
if
(
copy_from_user
(
&
calluserdata
,
(
void
*
)
arg
,
if
(
copy_from_user
(
&
calluserdata
,
argp
,
sizeof
(
calluserdata
)))
sizeof
(
calluserdata
)))
break
;
break
;
rc
=
-
EINVAL
;
rc
=
-
EINVAL
;
...
@@ -1300,13 +1301,13 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1300,13 +1301,13 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case
SIOCX25GCAUSEDIAG
:
{
case
SIOCX25GCAUSEDIAG
:
{
struct
x25_causediag
causediag
;
struct
x25_causediag
causediag
;
causediag
=
x25
->
causediag
;
causediag
=
x25
->
causediag
;
rc
=
copy_to_user
(
(
void
*
)
arg
,
&
causediag
,
rc
=
copy_to_user
(
argp
,
&
causediag
,
sizeof
(
causediag
))
?
-
EFAULT
:
0
;
sizeof
(
causediag
))
?
-
EFAULT
:
0
;
break
;
break
;
}
}
default:
default:
rc
=
dev_ioctl
(
cmd
,
(
void
__user
*
)
arg
);
rc
=
dev_ioctl
(
cmd
,
argp
);
break
;
break
;
}
}
...
...
net/x25/x25_link.c
View file @
bd8ef6d3
...
@@ -374,7 +374,7 @@ struct x25_neigh *x25_get_neigh(struct net_device *dev)
...
@@ -374,7 +374,7 @@ struct x25_neigh *x25_get_neigh(struct net_device *dev)
/*
/*
* Handle the ioctls that control the subscription functions.
* Handle the ioctls that control the subscription functions.
*/
*/
int
x25_subscr_ioctl
(
unsigned
int
cmd
,
void
*
arg
)
int
x25_subscr_ioctl
(
unsigned
int
cmd
,
void
__user
*
arg
)
{
{
struct
x25_subscrip_struct
x25_subscr
;
struct
x25_subscrip_struct
x25_subscr
;
struct
x25_neigh
*
nb
;
struct
x25_neigh
*
nb
;
...
...
net/x25/x25_route.c
View file @
bd8ef6d3
...
@@ -174,7 +174,7 @@ struct x25_route *x25_get_route(struct x25_address *addr)
...
@@ -174,7 +174,7 @@ struct x25_route *x25_get_route(struct x25_address *addr)
/*
/*
* Handle the ioctls that control the routing functions.
* Handle the ioctls that control the routing functions.
*/
*/
int
x25_route_ioctl
(
unsigned
int
cmd
,
void
*
arg
)
int
x25_route_ioctl
(
unsigned
int
cmd
,
void
__user
*
arg
)
{
{
struct
x25_route_struct
rt
;
struct
x25_route_struct
rt
;
struct
net_device
*
dev
;
struct
net_device
*
dev
;
...
...
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