Skip to content

Commit

Permalink
IB/ipath: NMI cpu lockup if local loopback used
Browse files Browse the repository at this point in the history
If a post send is done in loopback and there is no receive queue
entry, the sending QP is put on a timeout list for a while so the
receiver has a chance to post a receive buffer. If the another post
send is done, the code incorrectly tried to put the QP on the timeout
list again an corrupted the timeout list. This eventually leads to a
spin lock deadlock NMI due to the timer function looping forever with
the lock held.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Apr 19, 2007
1 parent 9f9630d commit 7b21d26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/ipath/ipath_ruc.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ static void ipath_ruc_loopback(struct ipath_qp *sqp)
again:
spin_lock_irqsave(&sqp->s_lock, flags);

if (!(ib_ipath_state_ops[sqp->state] & IPATH_PROCESS_SEND_OK)) {
if (!(ib_ipath_state_ops[sqp->state] & IPATH_PROCESS_SEND_OK) ||
qp->s_rnr_timeout) {
spin_unlock_irqrestore(&sqp->s_lock, flags);
goto done;
}
Expand Down

0 comments on commit 7b21d26

Please sign in to comment.