[ofw] [ofw'[Patch][umad] Avoid dangling reference

Hefty, Sean sean.hefty at intel.com
Tue Apr 19 22:57:31 PDT 2011


> --- umad.cpp      (revision 7570)
> 
> +++ umad.cpp   (revision 7571)
> 
> @@ -613,11 +613,11 @@
> 
> 
> 
>                 umad_convert_addr(&mad->addr, &((WM_MAD *) mad)->Address);
> 
>                 hr = ports[portid].prov->Send((WM_MAD *) mad, NULL);
> 
> -              umad_convert_av(&((WM_MAD *) mad)->Address, &mad->addr);
> 
>                 if (FAILED(hr)) {
> 
>                                 _set_errno(EIO);
> 
>                                 return GetLastError();
> 
>                 }
> 
> +             umad_convert_av(&((WM_MAD *) mad)->Address, &mad->addr);

I should have a fix for this within the next couple of days that won't impact performance greatly.  The winmad library will need to support both address formats: the WV_MAD_AV that it defined, plus a umad compatibility format.  It can distinguish between the two by checking the 'Version' bits in the address.  This should ensure backwards compatability.

However, this likely won't matter in practice, since there's no need to do anything unless grh_present flag is set, and I don't see anything in the stack which does this, or think of any reason why it should ever be needed.  But just in case some app out there is trying to use it, I'll update libibumad and winmad.dll accordingly.

- Sean



More information about the ofw mailing list