I just noticed another bug here I think:

here you search up to max_rc_qp:

 > +    for (index = 0; index < max_rc_qp; index++)
 > +            if (priv->cm.rx_index_table[index] == NULL)
 > +                    break;

but here

 > +            priv->cm.rx_index_table = kzalloc(NOSRQ_INDEX_TABLE_SIZE *
 > +                                     sizeof *priv->cm.rx_index_table,
 > +                                     GFP_KERNEL);

the table is allocated with a fixed size of NOSRQ_INDEX_TABLE_SIZE.
(BTW, kcalloc might be slightly preferred here, since you are actually
allocating an array).

If max_rc_qp is going to be a module parameter:

 > +module_param_named(nosrq_max_rc_qp, max_rc_qp, int, 0644);

(and, I just noticed, one you allow to be changed at runtime ?!)
then rx_index_table has to be allocated with the right size.

 - R.
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to