PERFORCE change 132326 for review
Steve Wise
swise at FreeBSD.org
Wed Jan 2 11:37:59 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=132326
Change 132326 by swise at swise:vic10:iwarp on 2008/01/02 19:37:06
dumping regs can corrupt memory.
bad pointer math causes the register dump buffer to be
overrun.
Affected files ...
.. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#7 edit
Differences ...
==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#7 (text+ko) ====
@@ -2683,7 +2683,7 @@
reg_block_dump(struct adapter *ap, uint8_t *buf, unsigned int start,
unsigned int end)
{
- uint32_t *p = (uint32_t *)buf + start;
+ uint32_t *p = (uint32_t *)(buf + start);
for ( ; start <= end; start += sizeof(uint32_t))
*p++ = t3_read_reg(ap, start);
More information about the p4-projects
mailing list