Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2008 19:37:59 GMT
From:      Steve Wise <swise@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 132326 for review
Message-ID:  <200801021937.m02Jbxgs024579@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132326

Change 132326 by swise@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801021937.m02Jbxgs024579>