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
b1d1e3a4
Commit
b1d1e3a4
authored
May 29, 2002
by
François Romieu
Committed by
Linus Torvalds
May 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] drivers/net/wan/dscc4.c - gross overflow
bug: array of u32 is accessed with offset in u8 units.
parent
33cf7447
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/net/wan/dscc4.c
drivers/net/wan/dscc4.c
+5
-5
No files found.
drivers/net/wan/dscc4.c
View file @
b1d1e3a4
...
...
@@ -204,7 +204,7 @@ struct dscc4_dev_priv {
dma_addr_t
iqtx_dma
;
dma_addr_t
iqrx_dma
;
volatile
u32
scc_regs
[
SCC_REGISTERS_MAX
];
/* Cf errata DS5 p.4 */
u32
scc_regs
[
SCC_REGISTERS_MAX
];
/* Cf errata DS5 p.4 */
struct
timer_list
timer
;
...
...
@@ -356,10 +356,10 @@ static void scc_patchl(u32 mask, u32 value, struct dscc4_dev_priv *dpriv,
u32
state
;
/* Cf scc_writel for concern regarding thread-safety */
state
=
dpriv
->
scc_regs
[
offset
];
state
=
dpriv
->
scc_regs
[
offset
>>
2
];
state
&=
~
mask
;
state
|=
value
;
dpriv
->
scc_regs
[
offset
]
=
state
;
dpriv
->
scc_regs
[
offset
>>
2
]
=
state
;
writel
(
state
,
dev
->
base_addr
+
SCC_REG_START
(
dpriv
)
+
offset
);
}
...
...
@@ -370,13 +370,13 @@ static void scc_writel(u32 bits, struct dscc4_dev_priv *dpriv,
* Thread-UNsafe.
* As of 2002/02/16, there are no thread racing for access.
*/
dpriv
->
scc_regs
[
offset
]
=
bits
;
dpriv
->
scc_regs
[
offset
>>
2
]
=
bits
;
writel
(
bits
,
dev
->
base_addr
+
SCC_REG_START
(
dpriv
)
+
offset
);
}
static
inline
u32
scc_readl
(
struct
dscc4_dev_priv
*
dpriv
,
int
offset
)
{
return
dpriv
->
scc_regs
[
offset
];
return
dpriv
->
scc_regs
[
offset
>>
2
];
}
static
u32
scc_readl_star
(
struct
dscc4_dev_priv
*
dpriv
,
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