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
2a55713c
Commit
2a55713c
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: decnet annotation
parent
158f9d76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
25 deletions
+25
-25
include/net/dn_dev.h
include/net/dn_dev.h
+1
-1
net/decnet/af_decnet.c
net/decnet/af_decnet.c
+4
-4
net/decnet/dn_dev.c
net/decnet/dn_dev.c
+10
-10
net/decnet/sysctl_net_decnet.c
net/decnet/sysctl_net_decnet.c
+10
-10
No files found.
include/net/dn_dev.h
View file @
2a55713c
...
...
@@ -155,7 +155,7 @@ struct rtnode_hello_message
extern
void
dn_dev_init
(
void
);
extern
void
dn_dev_cleanup
(
void
);
extern
int
dn_dev_ioctl
(
unsigned
int
cmd
,
void
*
arg
);
extern
int
dn_dev_ioctl
(
unsigned
int
cmd
,
void
__user
*
arg
);
extern
void
dn_dev_devices_off
(
void
);
extern
void
dn_dev_devices_on
(
void
);
...
...
net/decnet/af_decnet.c
View file @
2a55713c
...
...
@@ -1212,7 +1212,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
case
SIOCGIFADDR
:
case
SIOCSIFADDR
:
return
dn_dev_ioctl
(
cmd
,
(
void
*
)
arg
);
return
dn_dev_ioctl
(
cmd
,
(
void
__user
*
)
arg
);
case
SIOCATMARK
:
lock_sock
(
sk
);
...
...
@@ -1226,7 +1226,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
amount
=
sk
->
sk_sndbuf
-
atomic_read
(
&
sk
->
sk_wmem_alloc
);
if
(
amount
<
0
)
amount
=
0
;
err
=
put_user
(
amount
,
(
int
*
)
arg
);
err
=
put_user
(
amount
,
(
int
__user
*
)
arg
);
break
;
case
TIOCINQ
:
...
...
@@ -1244,7 +1244,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}
}
release_sock
(
sk
);
err
=
put_user
(
amount
,
(
int
*
)
arg
);
err
=
put_user
(
amount
,
(
int
__user
*
)
arg
);
break
;
default:
...
...
@@ -1325,7 +1325,7 @@ static int dn_setsockopt(struct socket *sock, int level, int optname, char __use
return
err
;
}
static
int
__dn_setsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
__user
__user
*
optval
,
int
optlen
,
int
flags
)
static
int
__dn_setsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
optlen
,
int
flags
)
{
struct
sock
*
sk
=
sock
->
sk
;
struct
dn_scp
*
scp
=
DN_SK
(
sk
);
...
...
net/decnet/dn_dev.c
View file @
2a55713c
...
...
@@ -161,10 +161,10 @@ static int min_priority[1];
static
int
max_priority
[]
=
{
127
};
/* From DECnet spec */
static
int
dn_forwarding_proc
(
ctl_table
*
,
int
,
struct
file
*
,
void
*
,
size_t
*
);
static
int
dn_forwarding_sysctl
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
__user
*
,
size_t
*
);
static
int
dn_forwarding_sysctl
(
ctl_table
*
table
,
int
__user
*
name
,
int
nlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
);
static
struct
dn_dev_sysctl_table
{
...
...
@@ -362,7 +362,7 @@ static void dn_dev_check_default(struct net_device *dev)
static
int
dn_forwarding_proc
(
ctl_table
*
table
,
int
write
,
struct
file
*
filep
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
#ifdef CONFIG_DECNET_ROUTER
struct
net_device
*
dev
=
table
->
extra1
;
...
...
@@ -404,9 +404,9 @@ static int dn_forwarding_proc(ctl_table *table, int write,
#endif
}
static
int
dn_forwarding_sysctl
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
static
int
dn_forwarding_sysctl
(
ctl_table
*
table
,
int
__user
*
name
,
int
nlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
#ifdef CONFIG_DECNET_ROUTER
...
...
@@ -423,7 +423,7 @@ static int dn_forwarding_sysctl(ctl_table *table, int *name, int nlen,
if
(
newlen
!=
sizeof
(
int
))
return
-
EINVAL
;
if
(
get_user
(
value
,
(
int
*
)
newval
))
if
(
get_user
(
value
,
(
int
__user
*
)
newval
))
return
-
EFAULT
;
if
(
value
<
0
)
return
-
EINVAL
;
...
...
@@ -553,7 +553,7 @@ static int dn_dev_set_ifa(struct net_device *dev, struct dn_ifaddr *ifa)
}
int
dn_dev_ioctl
(
unsigned
int
cmd
,
void
*
arg
)
int
dn_dev_ioctl
(
unsigned
int
cmd
,
void
__user
*
arg
)
{
char
buffer
[
DN_IFREQ_SIZE
];
struct
ifreq
*
ifr
=
(
struct
ifreq
*
)
buffer
;
...
...
net/decnet/sysctl_net_decnet.c
View file @
2a55713c
...
...
@@ -127,9 +127,9 @@ static int parse_addr(dn_address *addr, char *str)
}
static
int
dn_node_address_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
static
int
dn_node_address_strategy
(
ctl_table
*
table
,
int
__user
*
name
,
int
nlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
size_t
len
;
...
...
@@ -141,14 +141,14 @@ static int dn_node_address_strategy(ctl_table *table, int *name, int nlen,
if
(
len
)
{
if
(
len
!=
sizeof
(
unsigned
short
))
return
-
EINVAL
;
if
(
put_user
(
decnet_address
,
(
unsigned
short
*
)
oldval
))
if
(
put_user
(
decnet_address
,
(
unsigned
short
__user
*
)
oldval
))
return
-
EFAULT
;
}
}
if
(
newval
&&
newlen
)
{
if
(
newlen
!=
sizeof
(
unsigned
short
))
return
-
EINVAL
;
if
(
get_user
(
addr
,
(
unsigned
short
*
)
newval
))
if
(
get_user
(
addr
,
(
unsigned
short
__user
*
)
newval
))
return
-
EFAULT
;
dn_dev_devices_off
();
...
...
@@ -162,7 +162,7 @@ static int dn_node_address_strategy(ctl_table *table, int *name, int nlen,
static
int
dn_node_address_handler
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
char
addr
[
DN_ASCBUF_LEN
];
size_t
len
;
...
...
@@ -212,9 +212,9 @@ static int dn_node_address_handler(ctl_table *table, int write,
}
static
int
dn_def_dev_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
static
int
dn_def_dev_strategy
(
ctl_table
*
table
,
int
__user
*
name
,
int
nlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
size_t
len
;
...
...
@@ -273,7 +273,7 @@ static int dn_def_dev_strategy(ctl_table *table, int *name, int nlen,
static
int
dn_def_dev_handler
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
void
__user
*
buffer
,
size_t
*
lenp
)
{
size_t
len
;
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