[ofa-general] Re: [PATCH] opensm: Change ib_smp_init_new to return success/failure status

Sasha Khapyorsky sashak at voltaire.com
Sun Aug 2 06:16:16 PDT 2009


On 07:54 Sun 02 Aug     , Hal Rosenstock wrote:
> >
> > They should care to pass a valid data - ib_smp_init_new() is a simple
> > helper.
> 
> 
> opensm too ?

Ok, path overflow is theoretically possible only when path is extended
(by itself wrong extension will overflow osm_dr_path_t path buffer). So
it should be pretty enough to check for overflow only in three places:

requery_dup_node_info() in osm_node_info_rcv.c
pi_rcv_process_switch_port() in osm_port_info_rcv.c
state_mgr_get_remote_port_info() in osm_state_mgr.c

> Why replicate this simple check all over the place ?

And if you wish to make a single point check then I guess that function
osm_dr_path_extend() is the place (and this is called less frequently
than ib_smp_init_new()).

Sasha



More information about the general mailing list