[PATCH 06 of 33] IB/ipath - NMI cpu lockup if local loopback used

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bryan O'Sullivan
Date: Thursday, March 15, 2007 - 2:44 pm

# HG changeset patch
# User Ralph Campbell <ralph.campbell@qlogic.com>
# Date 1173994464 25200
# Node ID 78ae7bddbd5e205adc12993ad2956e0402ca01d7
# Parent  fa38a027a0853a80c4f7dfc50345c89f195bc85b
IB/ipath - NMI cpu lockup if local loopback used

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>

diff -r fa38a027a085 -r 78ae7bddbd5e drivers/infiniband/hw/ipath/ipath_ruc.c
--- a/drivers/infiniband/hw/ipath/ipath_ruc.c	Thu Mar 15 14:34:24 2007 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_ruc.c	Thu Mar 15 14:34:24 2007 -0700
@@ -265,7 +265,8 @@ again:
 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;
 	}
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00 of 33] Set of ipath patches for 2.6.22, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 06 of 33] IB/ipath - NMI cpu lockup if local loopba ..., Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 08 of 33] IB/ipath - fix up some debug messages, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 09 of 33] IB/ipath - fix QP error completion queue ..., Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 10 of 33] IB/ipath - fix PSN update for RC retries, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 12 of 33] IB/ipath - fix bad argument to clear_bit ..., Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 14 of 33] IB/ipath - fix port sharing on powerpc, Bryan O'Sullivan, (Thu Mar 15, 2:44 pm)
[PATCH 16 of 33] IB/ipath - fix RDMA reads of length zero ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 18 of 33] IB/ipath - Fix calculation for number of ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 21 of 33] IB/ipath - force PIOAvail update entry point, Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 26 of 33] IB/ipath - prevent random program use of ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 29 of 33] IB/ipath - fix unit selection due to all ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 30 of 33] IB/ipath - check reserved keys, Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
[PATCH 33 of 33] IB/ipath - fix drift between WCs in user ..., Bryan O'Sullivan, (Thu Mar 15, 2:45 pm)
Re: [PATCH 00 of 33] Set of ipath patches for 2.6.22, Roland Dreier, (Mon Mar 19, 2:17 pm)
Re: [PATCH 01 of 33] IB/ipath - add ability to set and cle ..., Bryan O'Sullivan, (Wed Mar 21, 11:50 am)
Re: [PATCH 00 of 33] Set of ipath patches for 2.6.22, Roland Dreier, (Tue Apr 10, 3:30 pm)