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
0d986b96
Commit
0d986b96
authored
Aug 13, 2003
by
Dave Jones
Committed by
Linus Torvalds
Aug 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] missing copy_*_user checks in sbni wan driver
parent
9739f37d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
drivers/net/wan/sbni.c
drivers/net/wan/sbni.c
+7
-4
No files found.
drivers/net/wan/sbni.c
View file @
0d986b96
...
@@ -1287,8 +1287,9 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
...
@@ -1287,8 +1287,9 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
error
=
verify_area
(
VERIFY_WRITE
,
ifr
->
ifr_data
,
error
=
verify_area
(
VERIFY_WRITE
,
ifr
->
ifr_data
,
sizeof
(
struct
sbni_in_stats
)
);
sizeof
(
struct
sbni_in_stats
)
);
if
(
!
error
)
if
(
!
error
)
copy_to_user
(
ifr
->
ifr_data
,
&
nl
->
in_stats
,
if
(
copy_to_user
(
ifr
->
ifr_data
,
&
nl
->
in_stats
,
sizeof
(
struct
sbni_in_stats
)
);
sizeof
(
struct
sbni_in_stats
)
))
return
-
EFAULT
;
break
;
break
;
case
SIOCDEVRESINSTATS
:
case
SIOCDEVRESINSTATS
:
...
@@ -1307,7 +1308,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
...
@@ -1307,7 +1308,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
error
=
verify_area
(
VERIFY_WRITE
,
ifr
->
ifr_data
,
error
=
verify_area
(
VERIFY_WRITE
,
ifr
->
ifr_data
,
sizeof
flags
);
sizeof
flags
);
if
(
!
error
)
if
(
!
error
)
copy_to_user
(
ifr
->
ifr_data
,
&
flags
,
sizeof
flags
);
if
(
copy_to_user
(
ifr
->
ifr_data
,
&
flags
,
sizeof
flags
))
return
-
EFAULT
;
break
;
break
;
case
SIOCDEVSHWSTATE
:
case
SIOCDEVSHWSTATE
:
...
@@ -1339,7 +1341,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
...
@@ -1339,7 +1341,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
sizeof
slave_name
))
!=
0
)
sizeof
slave_name
))
!=
0
)
return
error
;
return
error
;
copy_from_user
(
slave_name
,
ifr
->
ifr_data
,
sizeof
slave_name
);
if
(
copy_from_user
(
slave_name
,
ifr
->
ifr_data
,
sizeof
slave_name
))
return
-
EFAULT
;
slave_dev
=
dev_get_by_name
(
slave_name
);
slave_dev
=
dev_get_by_name
(
slave_name
);
if
(
!
slave_dev
||
!
(
slave_dev
->
flags
&
IFF_UP
)
)
{
if
(
!
slave_dev
||
!
(
slave_dev
->
flags
&
IFF_UP
)
)
{
printk
(
KERN_ERR
"%s: trying to enslave non-active "
printk
(
KERN_ERR
"%s: trying to enslave non-active "
...
...
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