.timeout_ms  = timeout_ms 
.timeout_ms  = timeout_ms, .retries     = 0 
static int send_mad(struct ib_sa_query *query, int timeout_ms){	struct ib_sa_port *port = query->port;	unsigned long flags;	int ret;	struct ib_sge      gather_list;	struct ib_send_wr *bad_wr, wr = {		.opcode      = IB_WR_SEND,		.sg_list     = &gather_list,		.num_sge     = 1,		.send_flags  = IB_SEND_SIGNALED,		.wr	     = {			 .ud = {				 .mad_hdr     = &query->mad->mad_hdr,				 .remote_qpn  = 1,				 .remote_qkey = IB_QP1_QKEY,				 .timeout_ms  = timeout_ms			 }		 }	};retry:	if (!idr_pre_get(&query_idr, GFP_ATOMIC))		return -ENOMEM;	spin_lock_irqsave(&idr_lock, flags);	ret = idr_get_new(&query_idr, query, &query->id);	spin_unlock_irqrestore(&idr_lock, flags);	if (ret == -EAGAIN)		goto retry;	if (ret)		return ret;	wr.wr_id = query->id;	spin_lock_irqsave(&port->ah_lock, flags);	kref_get(&port->sm_ah->ref);	query->sm_ah = port->sm_ah;	wr.wr.ud.ah  = port->sm_ah->ah;	spin_unlock_irqrestore(&port->ah_lock, flags);	gather_list.addr   = dma_map_single(port->agent->device->dma_device,					    query->mad,					    sizeof (struct ib_sa_mad),					    DMA_TO_DEVICE);	gather_list.length = sizeof (struct ib_sa_mad);	gather_list.lkey   = port->agent->mr->lkey;	pci_unmap_addr_set(query, mapping, gather_list.addr);	ret = ib_post_send_mad(port->agent, &wr, &bad_wr);	if (ret) {		dma_unmap_single(port->agent->device->dma_device,				 pci_unmap_addr(query, mapping),				 sizeof (struct ib_sa_mad),				 DMA_TO_DEVICE);		kref_put(&query->sm_ah->ref, free_sm_ah);		spin_lock_irqsave(&idr_lock, flags);		idr_remove(&query_idr, query->id);		spin_unlock_irqrestore(&idr_lock, flags);	}	/*	 * It's not safe to dereference query any more, because the	 * send may already have completed and freed the query in	 * another context.  So use wr.wr_id, which has a copy of the	 * query's id.	 */	return ret ? ret : wr.wr_id;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f75b7a5294949cd1b7bc301e3087c7bb78e22520/sa_query.c/buggy/drivers/infiniband/core/sa_query.c