On 7/30/07, Roland Dreier <[EMAIL PROTECTED]> wrote:
> I'm having a hard time seeing what this does exactly.  It seems that
> the current code
>
>                } else if (port_priv->device->node_type == 
> RDMA_NODE_IB_SWITCH) {
>                        /* forward case for switches */
>                        memcpy(response, recv, sizeof(*response));
>
> will blindly dereference response even if the allocation failed, so
> the first chunk that bails out if allocating response seems to be
> fixing this.

Yes.

> Anyway this seems like an unrelated change to the rest
> of the patch.

Do these need to be 2 separate patches ?

> I guess the leak fix is:
>
>  > -                       if (!agent_send_response(&response->mad.mad,
>
>  > +                       agent_send_response(&response->mad.mad,

Yes (not going to out is the leak fix).

> but now you're ignoring the return value of that function.
> Hmm... seems that the only other caller also ignores the return
> value too.  Should agent_send_response() just become a void function,
> since it doesn't seem as if there's anything useful to do with the
> return value anyway?

It could. Do you want an updated patch (or patches) ? Let me know.

-- Hal

>  - 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