On 08:59 Tue 13 Oct , Hal Rosenstock wrote:
> >> @@ -405,7 +406,7 @@ uint8_t osm_switch_get_port_least_hops(IN const
> >> osm_switch_t * p_sw,
> >> static inline uint8_t osm_switch_get_port_by_lid(IN const osm_switch_t *
> >> p_sw,
> >> IN uint16_t lid_ho)
> >> {
> >> - if (lid_ho == 0 || lid_ho > IB_LID_UCAST_END_HO)
> >> + if (lid_ho == 0 || lid_ho >= p_sw->lft_size)
> >
> > Similar story? Shouldn't this be checked against p_sw->max_lid_ho?
>
> Yes and this change could be considered independent as I think is a
> minor optimization even with the LFT heap changes.
It is not just optimization, but rather a bug fix - it should prevent
potential junk returned by this function. And yes, it exists even
without LFT reallocation stuff.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html