[ofa-general] [PATCH] opensm/osm_sa_mcmember_record.c: fix uninitilized proxy_join usage

Hal Rosenstock hrosenstock at xsigo.com
Wed Sep 19 15:30:39 PDT 2007


Hi Sasha,

On Wed, 2007-09-19 at 21:06 +0200, Sasha Khapyorsky wrote:
> Hi Hal,
> 
> On 21:02 Wed 19 Sep     , Sasha Khapyorsky wrote:
> > 
> > This fixes uninitilized usage of proxy_join var.
> > 
> > Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> > ---
> >  opensm/opensm/osm_sa_mcmember_record.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/opensm/opensm/osm_sa_mcmember_record.c b/opensm/opensm/osm_sa_mcmember_record.c
> > index a890525..4d4adfb 100644
> > --- a/opensm/opensm/osm_sa_mcmember_record.c
> > +++ b/opensm/opensm/osm_sa_mcmember_record.c
> > @@ -1773,7 +1773,7 @@ __osm_sa_mcm_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
> >  	uint8_t scope_state_mask = 0;
> >  	cl_map_item_t *p_item;
> >  	ib_gid_t port_gid;
> > -	boolean_t proxy_join;
> > +	boolean_t proxy_join = FALSE;
> 
> Does this fix look right for you?

ProxyJoin is a computed component and meaningless in the request.

It looks like proxy_join variable is used in the case of lack of trust
or a specific port specified in the request (the else clause (max one
record returned)). 

In the latter case (specific port specified), proxy_join gets
initialized but in the former case (non trusted request without a
specific port) it might not be initialized so there might be an issue
there with that combination. Setting this to non proxy seems safer to me
and is certainly better than uninitialized but I need to think more
about this.

-- Hal

>  Thanks.
> 
> Sasha
> 
> >  
> >  	OSM_LOG_ENTER(p_rcv->p_log, __osm_sa_mcm_by_comp_mask_cb);
> >  
> > -- 
> > 1.5.3.rc2.29.gc4640f
> > 
> > _______________________________________________
> > general mailing list
> > general at lists.openfabrics.org
> > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> > 
> > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list