Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64091
b: refs/heads/master
c: 445d680
h: refs/heads/master
i:
  64089: a100882
  64087: c2a4cb8
v: v3
  • Loading branch information
Hal Rosenstock authored and Roland Dreier committed Aug 3, 2007
1 parent f8549f7 commit 4d7a814
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5399891052badf97948098d01772113801f6ef58
refs/heads/master: 445d68070c9c02acdda38e6d69bd43096f521035
14 changes: 8 additions & 6 deletions trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,16 +1842,11 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
{
struct ib_mad_qp_info *qp_info;
struct ib_mad_private_header *mad_priv_hdr;
struct ib_mad_private *recv, *response;
struct ib_mad_private *recv, *response = NULL;
struct ib_mad_list_head *mad_list;
struct ib_mad_agent_private *mad_agent;
int port_num;

response = kmem_cache_alloc(ib_mad_cache, GFP_KERNEL);
if (!response)
printk(KERN_ERR PFX "ib_mad_recv_done_handler no memory "
"for response buffer\n");

mad_list = (struct ib_mad_list_head *)(unsigned long)wc->wr_id;
qp_info = mad_list->mad_queue->qp_info;
dequeue_mad(mad_list);
Expand Down Expand Up @@ -1879,6 +1874,13 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
if (!validate_mad(&recv->mad.mad, qp_info->qp->qp_num))
goto out;

response = kmem_cache_alloc(ib_mad_cache, GFP_KERNEL);
if (!response) {
printk(KERN_ERR PFX "ib_mad_recv_done_handler no memory "
"for response buffer\n");
goto out;
}

if (port_priv->device->node_type == RDMA_NODE_IB_SWITCH)
port_num = wc->port_num;
else
Expand Down

0 comments on commit 4d7a814

Please sign in to comment.