Commit:     f4ad1bcc4425a772ea584e1f24abadc64c2b839f
Parent:     a6e7550d8f73d6b75c20afff321f0f06fe144775
Author:     Ralph Campbell <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 08:02:39 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Nov 13 15:26:58 2007 -0800

    IB/ipath: Fix race with ACK retry timeout list management
    When an ACK is received, the QP is removed from the timeout list and
    then if there are still pending send WQEs, the QP is put back on the
    timeout list. It is possible that another post send has put the QP on
    the timeout list thus, a check needs to be made before trying to do it
    again or the list is corrupted.
    Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
 drivers/infiniband/hw/ipath/ipath_rc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c 
index 5c29b2b..120a61b 100644
--- a/drivers/infiniband/hw/ipath/ipath_rc.c
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c
@@ -959,8 +959,9 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 
psn, int opcode,
                /* If this is a partial ACK, reset the retransmit timer. */
                if (qp->s_last != qp->s_tail) {
-                       list_add_tail(&qp->timerwait,
-                                     &dev->pending[dev->pending_index]);
+                       if (list_empty(&qp->timerwait))
+                               list_add_tail(&qp->timerwait,
+                                       &dev->pending[dev->pending_index]);
                         * If we get a partial ACK for a resent operation,
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to