[ofa-general] IPOB CM (NOSRQ) [PATCH V8] patch
Roland Dreier
rdreier at cisco.com
Fri Jul 20 21:02:11 PDT 2007
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.
More information about the general
mailing list