aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2007-09-20 19:33:44 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:14 -0400
commit57cb61d587e990d556385d367589ff61f6c2c0f2 (patch)
treef9ecc12b569d9971500a5f27f48fe7f059a19b2a /drivers/infiniband
parent9faa559c01311281f26544291322252327b65922 (diff)
IB/core: Fix handling of multicast response failures
I was looking at the code for multicast.c and noticed that ib_sa_join_multicast() calls queue_join() which puts the request at the front of the group->pending_list. If this is a second request, it seems like it would interfere with process_join_error() since group->last_join won't point to the member at the head of the pending_list. The sequence would thus be: 1. ib_sa_join_multicast() puts member1 on head of pending_list and starts work thread 2. mcast_work_handler() calls send_join() which sets group->last_join to member1 3. ib_sa_join_multicast() puts member2 on head of pending_list 4. join operation for member1 receives failures response from SA. 5. join_handler() is called with error status 6. process_join_error() fails to process member1 since it doesn't match the first entry in the group->pending_list. The impact is that the failed join request is tossed. The second request is processed, and after it completes, the original request ends up being retried. This change also results in join requests being processed in FIFO order. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/multicast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
index 15b4c4d3606..1bc1fe60528 100644
--- a/drivers/infiniband/core/multicast.c
+++ b/drivers/infiniband/core/multicast.c
@@ -196,7 +196,7 @@ static void queue_join(struct mcast_member *member)
196 unsigned long flags; 196 unsigned long flags;
197 197
198 spin_lock_irqsave(&group->lock, flags); 198 spin_lock_irqsave(&group->lock, flags);
199 list_add(&member->list, &group->pending_list); 199 list_add_tail(&member->list, &group->pending_list);
200 if (group->state == MCAST_IDLE) { 200 if (group->state == MCAST_IDLE) {
201 group->state = MCAST_BUSY; 201 group->state = MCAST_BUSY;
202 atomic_inc(&group->refcount); 202 atomic_inc(&group->refcount);