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
286fa6c9
Commit
286fa6c9
authored
Oct 03, 2003
by
Randy Dunlap
Committed by
Stephen Hemminger
Oct 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Remove verify_area() in net/wan/sbni (from domen@coderock.org)
parent
d0ec1bd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
+5
-15
drivers/net/wan/sbni.c
drivers/net/wan/sbni.c
+5
-15
No files found.
drivers/net/wan/sbni.c
View file @
286fa6c9
...
...
@@ -1300,12 +1300,9 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
switch
(
cmd
)
{
case
SIOCDEVGETINSTATS
:
error
=
verify_area
(
VERIFY_WRITE
,
ifr
->
ifr_data
,
sizeof
(
struct
sbni_in_stats
)
);
if
(
!
error
)
if
(
copy_to_user
(
ifr
->
ifr_data
,
&
nl
->
in_stats
,
sizeof
(
struct
sbni_in_stats
)
))
return
-
EFAULT
;
if
(
copy_to_user
(
ifr
->
ifr_data
,
&
nl
->
in_stats
,
sizeof
(
struct
sbni_in_stats
)
))
error
=
-
EFAULT
;
break
;
case
SIOCDEVRESINSTATS
:
...
...
@@ -1321,11 +1318,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
flags
.
rxl
=
nl
->
cur_rxl_index
;
flags
.
fixed_rxl
=
nl
->
delta_rxl
==
0
;
error
=
verify_area
(
VERIFY_WRITE
,
ifr
->
ifr_data
,
sizeof
flags
);
if
(
!
error
)
if
(
copy_to_user
(
ifr
->
ifr_data
,
&
flags
,
sizeof
flags
))
return
-
EFAULT
;
if
(
copy_to_user
(
ifr
->
ifr_data
,
&
flags
,
sizeof
flags
))
error
=
-
EFAULT
;
break
;
case
SIOCDEVSHWSTATE
:
...
...
@@ -1353,10 +1347,6 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
if
(
current
->
euid
!=
0
)
/* root only */
return
-
EPERM
;
if
(
(
error
=
verify_area
(
VERIFY_READ
,
ifr
->
ifr_data
,
sizeof
slave_name
))
!=
0
)
return
error
;
if
(
copy_from_user
(
slave_name
,
ifr
->
ifr_data
,
sizeof
slave_name
))
return
-
EFAULT
;
slave_dev
=
dev_get_by_name
(
slave_name
);
...
...
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