* Patch "IB/hfi1: Fix hard lockup due to not using save/restore spin lock" has been added to the 4.6-stable tree
@ 2016-06-05 20:57 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-06-05 20:57 UTC (permalink / raw)
To: mike.marciniszyn, dennis.dalessandro, dledford, gregkh,
sebastian.sanchez
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
IB/hfi1: Fix hard lockup due to not using save/restore spin lock
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ib-hfi1-fix-hard-lockup-due-to-not-using-save-restore-spin-lock.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 7049de65c9e520886f06d6f9deceaaed5d93fb7c Mon Sep 17 00:00:00 2001
From: Mike Marciniszyn <mike.marciniszyn@intel.com>
Date: Tue, 24 May 2016 12:50:23 -0700
Subject: IB/hfi1: Fix hard lockup due to not using save/restore spin lock
From: Mike Marciniszyn <mike.marciniszyn@intel.com>
commit 7049de65c9e520886f06d6f9deceaaed5d93fb7c upstream.
Commit b9b06cb6feda
("IB/hfi1: Fix missing lock/unlock in verbs drain callback")
added a spin lock.
Unfortunately, the new lock code can be called from a base
level interrupt state, and an interrupt that can get stacked
will attempt to get the same lock.
Fix by using the flag save/restore spin lock variation.
Cc: stable@vger.kernel.org # 4.6+
Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/rdma/hfi1/qp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/staging/rdma/hfi1/qp.c
+++ b/drivers/staging/rdma/hfi1/qp.c
@@ -512,6 +512,7 @@ static void iowait_wakeup(struct iowait
static void iowait_sdma_drained(struct iowait *wait)
{
struct rvt_qp *qp = iowait_to_qp(wait);
+ unsigned long flags;
/*
* This happens when the send engine notes
@@ -519,12 +520,12 @@ static void iowait_sdma_drained(struct i
* do the flush work until that QP's
* sdma work has finished.
*/
- spin_lock(&qp->s_lock);
+ spin_lock_irqsave(&qp->s_lock, flags);
if (qp->s_flags & RVT_S_WAIT_DMA) {
qp->s_flags &= ~RVT_S_WAIT_DMA;
hfi1_schedule_send(qp);
}
- spin_unlock(&qp->s_lock);
+ spin_unlock_irqrestore(&qp->s_lock, flags);
}
/**
Patches currently in stable-queue which might be from mike.marciniszyn@intel.com are
queue-4.6/ib-hfi1-fix-hard-lockup-due-to-not-using-save-restore-spin-lock.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-05 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-05 20:57 Patch "IB/hfi1: Fix hard lockup due to not using save/restore spin lock" has been added to the 4.6-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).