ret = ib_post_send_mad(cm_id_priv->av.port->mad_agent, &msg->send_wr, &bad_send_wr); 
ret = ib_post_send_mad(msg, NULL); 
int ib_send_cm_mra(struct ib_cm_id *cm_id,		   u8 service_timeout,		   const void *private_data,		   u8 private_data_len){	struct cm_id_private *cm_id_priv;	struct ib_mad_send_buf *msg;	struct ib_send_wr *bad_send_wr;	void *data;	unsigned long flags;	int ret;	if (private_data && private_data_len > IB_CM_MRA_PRIVATE_DATA_SIZE)		return -EINVAL;	data = cm_copy_private_data(private_data, private_data_len);	if (IS_ERR(data))		return PTR_ERR(data);	cm_id_priv = container_of(cm_id, struct cm_id_private, id);	spin_lock_irqsave(&cm_id_priv->lock, flags);	switch(cm_id_priv->id.state) {	case IB_CM_REQ_RCVD:		ret = cm_alloc_msg(cm_id_priv, &msg);		if (ret)			goto error1;		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,			      CM_MSG_RESPONSE_REQ, service_timeout,			      private_data, private_data_len);		ret = ib_post_send_mad(cm_id_priv->av.port->mad_agent,				       &msg->send_wr, &bad_send_wr);		if (ret)			goto error2;		cm_id->state = IB_CM_MRA_REQ_SENT;		break;	case IB_CM_REP_RCVD:		ret = cm_alloc_msg(cm_id_priv, &msg);		if (ret)			goto error1;		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,			      CM_MSG_RESPONSE_REP, service_timeout,			      private_data, private_data_len);		ret = ib_post_send_mad(cm_id_priv->av.port->mad_agent,				       &msg->send_wr, &bad_send_wr);		if (ret)			goto error2;		cm_id->state = IB_CM_MRA_REP_SENT;		break;	case IB_CM_ESTABLISHED:		ret = cm_alloc_msg(cm_id_priv, &msg);		if (ret)			goto error1;		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,			      CM_MSG_RESPONSE_OTHER, service_timeout,			      private_data, private_data_len);		ret = ib_post_send_mad(cm_id_priv->av.port->mad_agent,				       &msg->send_wr, &bad_send_wr);		if (ret)			goto error2;		cm_id->lap_state = IB_CM_MRA_LAP_SENT;		break;	default:		ret = -EINVAL;		goto error1;	}	cm_id_priv->service_timeout = service_timeout;	cm_set_private_data(cm_id_priv, data, private_data_len);	spin_unlock_irqrestore(&cm_id_priv->lock, flags);	return 0;error1:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);	kfree(data);	return ret;error2:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);	kfree(data);	cm_free_msg(msg);	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/34816ad98efe4d47ffd858a0345321f9d85d9420/cm.c/buggy/drivers/infiniband/core/cm.c