projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e75fba9
)
scsi: atp870u: 64 bit bug in atp885_init()
author
Dan Carpenter
<
[email protected]
>
Wed, 14 Feb 2018 12:02:31 +0000
(15:02 +0300)
committer
Martin K. Petersen
<
[email protected]
>
Fri, 2 Mar 2018 02:10:36 +0000
(21:10 -0500)
On 64 bit CPUs there is a memory corruption bug on probe(). It should
be a u32 pointer instead of an unsigned long pointer or we write past
the end of the setupdata[] array.
Signed-off-by: Dan Carpenter <
[email protected]
>
Reviewed-by: Hannes Reinecke <
[email protected]
>
Signed-off-by: Martin K. Petersen <
[email protected]
>
drivers/scsi/atp870u.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/atp870u.c
b/drivers/scsi/atp870u.c
index 8b52a9dbb9cf5a5fd18dd572f9459db57783b074..b46997cf77e2ac0df2f6df619ed27fae4faaf8d9 100644
(file)
--- a/
drivers/scsi/atp870u.c
+++ b/
drivers/scsi/atp870u.c
@@
-1413,11
+1413,11
@@
static void atp885_init(struct Scsi_Host *shpnt)
atpdev->global_map[m] = 0;
for (k = 0; k < 4; k++) {
atp_writew_base(atpdev, 0x3c, n++);
- ((u
nsigned long
*)&setupdata[m][0])[k] = atp_readl_base(atpdev, 0x38);
+ ((u
32
*)&setupdata[m][0])[k] = atp_readl_base(atpdev, 0x38);
}
for (k = 0; k < 4; k++) {
atp_writew_base(atpdev, 0x3c, n++);
- ((u
nsigned long
*)&atpdev->sp[m][0])[k] = atp_readl_base(atpdev, 0x38);
+ ((u
32
*)&atpdev->sp[m][0])[k] = atp_readl_base(atpdev, 0x38);
}
n += 8;
}