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
45e836f6
Commit
45e836f6
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: appletalk annotation
parent
6b464d53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
net/appletalk/ddp.c
net/appletalk/ddp.c
+9
-8
No files found.
net/appletalk/ddp.c
View file @
45e836f6
...
@@ -673,7 +673,7 @@ static int ddp_device_event(struct notifier_block *this, unsigned long event,
...
@@ -673,7 +673,7 @@ static int ddp_device_event(struct notifier_block *this, unsigned long event,
/* ioctl calls. Shouldn't even need touching */
/* ioctl calls. Shouldn't even need touching */
/* Device configuration ioctl calls */
/* Device configuration ioctl calls */
static
int
atif_ioctl
(
int
cmd
,
void
*
arg
)
static
int
atif_ioctl
(
int
cmd
,
void
__user
*
arg
)
{
{
static
char
aarp_mcast
[
6
]
=
{
0x09
,
0x00
,
0x00
,
0xFF
,
0xFF
,
0xFF
};
static
char
aarp_mcast
[
6
]
=
{
0x09
,
0x00
,
0x00
,
0xFF
,
0xFF
,
0xFF
};
struct
ifreq
atreq
;
struct
ifreq
atreq
;
...
@@ -892,7 +892,7 @@ static int atif_ioctl(int cmd, void *arg)
...
@@ -892,7 +892,7 @@ static int atif_ioctl(int cmd, void *arg)
}
}
/* Routing ioctl() calls */
/* Routing ioctl() calls */
static
int
atrtr_ioctl
(
unsigned
int
cmd
,
void
*
arg
)
static
int
atrtr_ioctl
(
unsigned
int
cmd
,
void
__user
*
arg
)
{
{
struct
rtentry
rt
;
struct
rtentry
rt
;
...
@@ -1769,6 +1769,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1769,6 +1769,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
{
int
rc
=
-
EINVAL
;
int
rc
=
-
EINVAL
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
switch
(
cmd
)
{
switch
(
cmd
)
{
/* Protocol layer */
/* Protocol layer */
...
@@ -1778,7 +1779,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1778,7 +1779,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if
(
amount
<
0
)
if
(
amount
<
0
)
amount
=
0
;
amount
=
0
;
rc
=
put_user
(
amount
,
(
int
*
)
arg
);
rc
=
put_user
(
amount
,
(
int
__user
*
)
argp
);
break
;
break
;
}
}
case
TIOCINQ
:
{
case
TIOCINQ
:
{
...
@@ -1791,18 +1792,18 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1791,18 +1792,18 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if
(
skb
)
if
(
skb
)
amount
=
skb
->
len
-
sizeof
(
struct
ddpehdr
);
amount
=
skb
->
len
-
sizeof
(
struct
ddpehdr
);
rc
=
put_user
(
amount
,
(
int
*
)
arg
);
rc
=
put_user
(
amount
,
(
int
__user
*
)
argp
);
break
;
break
;
}
}
case
SIOCGSTAMP
:
case
SIOCGSTAMP
:
rc
=
sock_get_timestamp
(
sk
,
(
struct
timeval
__user
*
)
arg
);
rc
=
sock_get_timestamp
(
sk
,
argp
);
break
;
break
;
/* Routing */
/* Routing */
case
SIOCADDRT
:
case
SIOCADDRT
:
case
SIOCDELRT
:
case
SIOCDELRT
:
rc
=
-
EPERM
;
rc
=
-
EPERM
;
if
(
capable
(
CAP_NET_ADMIN
))
if
(
capable
(
CAP_NET_ADMIN
))
rc
=
atrtr_ioctl
(
cmd
,
(
void
*
)
arg
);
rc
=
atrtr_ioctl
(
cmd
,
argp
);
break
;
break
;
/* Interface */
/* Interface */
case
SIOCGIFADDR
:
case
SIOCGIFADDR
:
...
@@ -1813,7 +1814,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1813,7 +1814,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case
SIOCSARP
:
/* proxy AARP */
case
SIOCSARP
:
/* proxy AARP */
case
SIOCDARP
:
/* proxy AARP */
case
SIOCDARP
:
/* proxy AARP */
rtnl_lock
();
rtnl_lock
();
rc
=
atif_ioctl
(
cmd
,
(
void
*
)
arg
);
rc
=
atif_ioctl
(
cmd
,
argp
);
rtnl_unlock
();
rtnl_unlock
();
break
;
break
;
/* Physical layer ioctl calls */
/* Physical layer ioctl calls */
...
@@ -1829,7 +1830,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -1829,7 +1830,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case
SIOCGIFCOUNT
:
case
SIOCGIFCOUNT
:
case
SIOCGIFINDEX
:
case
SIOCGIFINDEX
:
case
SIOCGIFNAME
:
case
SIOCGIFNAME
:
rc
=
dev_ioctl
(
cmd
,
(
void
__user
*
)
arg
);
rc
=
dev_ioctl
(
cmd
,
argp
);
break
;
break
;
}
}
...
...
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