Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5214
b: refs/heads/master
c: 2c153b9
h: refs/heads/master
v: v3
  • Loading branch information
Hal Rosenstock authored and Linus Torvalds committed Jul 27, 2005
1 parent 6e3e289 commit 4f208ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: dbf9227bd3dff71c3c2f540cc3e96098d2ab41e7
refs/heads/master: 2c153b934dca08d58e0aafde18a182e0891aa201
7 changes: 6 additions & 1 deletion trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1994,6 +1994,8 @@ static void cancel_mads(struct ib_mad_agent_private *mad_agent_priv)

/* Empty wait list to prevent receives from finding a request */
list_splice_init(&mad_agent_priv->wait_list, &cancel_list);
/* Empty local completion list as well */
list_splice_init(&mad_agent_priv->local_list, &cancel_list);
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);

/* Report all cancelled requests */
Expand Down Expand Up @@ -2108,6 +2110,7 @@ static void local_completions(void *data)
struct ib_mad_local_private *local;
struct ib_mad_agent_private *recv_mad_agent;
unsigned long flags;
int recv = 0;
struct ib_wc wc;
struct ib_mad_send_wc mad_send_wc;

Expand All @@ -2123,10 +2126,10 @@ static void local_completions(void *data)
recv_mad_agent = local->recv_mad_agent;
if (!recv_mad_agent) {
printk(KERN_ERR PFX "No receive MAD agent for local completion\n");
kmem_cache_free(ib_mad_cache, local->mad_priv);
goto local_send_completion;
}

recv = 1;
/*
* Defined behavior is to complete response
* before request
Expand Down Expand Up @@ -2169,6 +2172,8 @@ static void local_completions(void *data)
spin_lock_irqsave(&mad_agent_priv->lock, flags);
list_del(&local->completion_list);
atomic_dec(&mad_agent_priv->refcount);
if (!recv)
kmem_cache_free(ib_mad_cache, local->mad_priv);
kfree(local);
}
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
Expand Down

0 comments on commit 4f208ba

Please sign in to comment.