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
91859c08
Commit
91859c08
authored
May 05, 2003
by
Chas Williams
Committed by
David S. Miller
May 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Fix excessive stack usage in iphase driver.
parent
47507516
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
drivers/atm/iphase.c
drivers/atm/iphase.c
+11
-4
No files found.
drivers/atm/iphase.c
View file @
91859c08
...
@@ -2792,11 +2792,15 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
...
@@ -2792,11 +2792,15 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
break
;
break
;
case
MEMDUMP_FFL
:
case
MEMDUMP_FFL
:
{
{
ia_regs_t
regs_local
;
ia_regs_t
*
regs_local
;
ffredn_t
*
ffL
=
&
regs_local
.
ffredn
;
ffredn_t
*
ffL
;
rfredn_t
*
rfL
=
&
regs_local
.
rfredn
;
rfredn_t
*
rfL
;
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EPERM
;
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EPERM
;
regs_local
=
kmalloc
(
sizeof
(
*
regs_local
),
GFP_KERNEL
);
if
(
!
regs_local
)
return
-
ENOMEM
;
ffL
=
&
regs_local
->
ffredn
;
rfL
=
&
regs_local
->
rfredn
;
/* Copy real rfred registers into the local copy */
/* Copy real rfred registers into the local copy */
for
(
i
=
0
;
i
<
(
sizeof
(
rfredn_t
))
/
4
;
i
++
)
for
(
i
=
0
;
i
<
(
sizeof
(
rfredn_t
))
/
4
;
i
++
)
((
u_int
*
)
rfL
)[
i
]
=
((
u_int
*
)
iadev
->
reass_reg
)[
i
]
&
0xffff
;
((
u_int
*
)
rfL
)[
i
]
=
((
u_int
*
)
iadev
->
reass_reg
)[
i
]
&
0xffff
;
...
@@ -2804,8 +2808,11 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
...
@@ -2804,8 +2808,11 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
for
(
i
=
0
;
i
<
(
sizeof
(
ffredn_t
))
/
4
;
i
++
)
for
(
i
=
0
;
i
<
(
sizeof
(
ffredn_t
))
/
4
;
i
++
)
((
u_int
*
)
ffL
)[
i
]
=
((
u_int
*
)
iadev
->
seg_reg
)[
i
]
&
0xffff
;
((
u_int
*
)
ffL
)[
i
]
=
((
u_int
*
)
iadev
->
seg_reg
)[
i
]
&
0xffff
;
if
(
copy_to_user
(
ia_cmds
.
buf
,
&
regs_local
,
sizeof
(
ia_regs_t
)))
if
(
copy_to_user
(
ia_cmds
.
buf
,
regs_local
,
sizeof
(
ia_regs_t
)))
{
kfree
(
regs_local
);
return
-
EFAULT
;
return
-
EFAULT
;
}
kfree
(
regs_local
);
printk
(
"Board %d registers dumped
\n
"
,
board
);
printk
(
"Board %d registers dumped
\n
"
,
board
);
ia_cmds
.
status
=
0
;
ia_cmds
.
status
=
0
;
}
}
...
...
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