kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [SCSI] atp870u: 64 bit bug in probe()
@ 2013-09-04  9:50 Dan Carpenter
  2015-07-29 21:36 ` Dan Carpenter
  0 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2013-09-04  9:50 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: linux-scsi, kernel-janitors

On 64 bit CPUs there is a memory corruption bug on probe().  It should
be setting 32 bits of data on both 32 and 64 bit.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static checker stuff.  I can't test this.

diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 15a629d..3edbf30 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -2791,11 +2791,11 @@ next_fblk_885:
 		    p->global_map[m]= 0;
 		    for (k=0; k < 4; k++) {
 			outw(n++,base_io + 0x3c);
-			((unsigned long *)&setupdata[m][0])[k]=inl(base_io + 0x38);
+			((u32 *)&setupdata[m][0])[k]=inl(base_io + 0x38);
 		    }
 		    for (k=0; k < 4; k++) {
 			outw(n++,base_io + 0x3c);
-			((unsigned long *)&p->sp[m][0])[k]=inl(base_io + 0x38);
+			((u32 *)&p->sp[m][0])[k]=inl(base_io + 0x38);
 		    }
 		    n += 8;
 		}

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-03-02  2:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04  9:50 [patch] [SCSI] atp870u: 64 bit bug in probe() Dan Carpenter
2015-07-29 21:36 ` Dan Carpenter
2015-07-30  6:54   ` Hannes Reinecke
2015-12-09 10:24     ` [patch RESEND] atp870u: 64 bit bug in atp885_init() Dan Carpenter
2015-12-09 11:53       ` One Thousand Gnomes
2015-12-09 12:07         ` Ondrej Zary
2015-12-09 13:45         ` Dan Carpenter
2015-12-09 14:14           ` One Thousand Gnomes
2015-12-09 17:48             ` Dan Carpenter
2015-12-09 18:11               ` Julia Lawall
2015-12-09 18:28                 ` Dan Carpenter
2015-12-09 19:37                   ` One Thousand Gnomes
2018-02-15 23:44       ` Martin K. Petersen
2018-03-02  2:11       ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).