[ofa-general] Re: [PATCH] opensm/opensm/osm_state_mgr.c: Add check for valid physical port before using pointer.

Sasha Khapyorsky sashak at voltaire.com
Wed Nov 12 10:54:57 PST 2008


Hi Ira,

On 13:11 Mon 10 Nov     , Ira Weiny wrote:
> > 
> > Actually it can be a valid case. For example when node was first time
> > discovered via port A, when this port was disconnected and the same node
> > was discovered via port B - it is not a new node and node_info (where
> > port number for osm_node_get_any_physp_ptr() is stored) will not be
> > updated.
> 
> Ah, good point, I just happened to see it when PortInfo failed.
> 
> > 
> > Obviously the patch is fine. But probably we need more general fix, for
> > example to redo osm_node_get_any_physp_ptr() so that it will not return
> > invalid ports. Need to review other osm_node_get_any_physp_ptr() usages.
> 
> I was wondering if it would return invalid ports ever.  It would be easy for it
> to return only valid ports but perhaps that should be another function to
> preserve functionality?

Perhaps. OTOH osm_node_get_any_physp_ptr() is used very few. I think
first we need to review all those cases, then we will know better how to
handle this.

Sasha



More information about the general mailing list