<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>destroying an AH from user space causes segmentation fault</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">I'm using driver revision 2851 with HCA 23108.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Here is a back trace from a core dump of this seg fault:</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Loaded symbols for /usr/local/lib/infiniband/mthca.so</FONT>
<BR><FONT SIZE=2 FACE="Arial">#0 0x4001ef8b in mthca_free_av (ah=0x804db70) at ah.c:171</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">warning: Source file is more recent than executable.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">171 i = ((void *) ah->av - page->buf) / sizeof *ah->av;</FONT>
<BR><FONT SIZE=2 FACE="Arial">(gdb) bt</FONT>
<BR><FONT SIZE=2 FACE="Arial">#0 0x4001ef8b in mthca_free_av (ah=0x804db70) at ah.c:171</FONT>
<BR><FONT SIZE=2 FACE="Arial">#1 0x40021d1d in mthca_destroy_ah (ah=0x804db70) at mthca.h:242</FONT>
<BR><FONT SIZE=2 FACE="Arial">#2 0x4001bfdf in ibv_destroy_ah (ah=0x0) at verbs.c:194</FONT>
<BR><FONT SIZE=2 FACE="Arial">#3 0x080491b7 in main (argc=1, argv=0xbf97a4b4) at sa_ping.c:361</FONT>
<BR><FONT SIZE=2 FACE="Arial">(gdb) p ah</FONT>
<BR><FONT SIZE=2 FACE="Arial">$1 = (struct mthca_ah *) 0x804db70</FONT>
<BR><FONT SIZE=2 FACE="Arial">(gdb) p page</FONT>
<BR><FONT SIZE=2 FACE="Arial">$2 = (struct mthca_ah_page *) 0x0</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial">i attached a small test that reproduces this failure.</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<destroy_av.c>> </FONT>
<BR><B><I><FONT COLOR="#008080" SIZE=6 FACE="Script">Dotan Barak</FONT></I></B>
<BR><FONT FACE="Times New Roman">Software Verification Engineer</FONT>
<BR><FONT FACE="Times New Roman">Mellanox Technologies LTD</FONT>
<BR><FONT SIZE=1 FACE="Tahoma"><A HREF="mailto:dotanb@mellanox.co.il">mailto:dotanb@mellanox.co.il</A></FONT>
<BR><FONT FACE="Times New Roman">Tel: +972-4-9097200 Ext: 231 Fax: +972-4-9593245</FONT>
<BR><FONT FACE="Times New Roman">P.O. Box 86 Yokneam 20692 ISRAEL.</FONT>
<BR><FONT FACE="Times New Roman">Home: +972-4-8289408 Cell: 0</FONT><FONT SIZE=2 FACE="Arial">52-4222383</FONT>
</P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial">[ May the fork be with you ]</FONT>
</P>
</BODY>
</HTML>