FAILED: patch "[PATCH] IB/hfi1: Fix deadlock with txreq allocation slow path" failed to apply to 4.6-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
2aee309d3e01447c55fdf89cef05a0e2be372655Mon Sep 17 00:00:00 2001
From: Mike Marciniszyn <[email protected]>
Date: Fri, 17 Jun 2016 19:17:49 -0700
Subject: [PATCH] IB/hfi1: Fix deadlock with txreq allocation slow path
A failure in the get_txreq() inline will result in a slow path retry using __get_txreq().
__get_txreq() attempts to procure the qp s_lock, which is already held in all callers.
Fix by deleting the s_lock maintenance in __get_txreq() and add sparse syntax hooks to future proof the code.
drivers/infiniband/hw/hfi1/verbs_txreq.c +1 -3
@@ -92,11 +92,10 @@ void hfi1_put_txreq(struct verbs_txreq *tx)struct verbs_txreq *__get_txreq (struct hfi1_ibdev *dev,struct rvt_qp *qp) + __must_hold(&qp->s_lock) {struct verbs_txreq *tx =ERR_PTR (-EBUSY ); -unsigned long flags; -spin_lock_irqsave (&qp->s_lock, flags);write_seqlock (&dev->iowait_lock);if (ib_rvt_state_ops[qp->state] &RVT_PROCESS_RECV_OK ) {struct hfi1_qp_priv *priv;
@@ -116,7 +115,6 @@ struct verbs_txreq *__get_txreq(struct hfi1_ibdev *dev, } out:write_sequnlock (&dev->iowait_lock); -spin_unlock_irqrestore (&qp->s_lock, flags);return tx; }
drivers/infiniband/hw/hfi1/verbs_txreq.h +1 -0
@@ -73,6 +73,7 @@ struct verbs_txreq *__get_txreq(struct hfi1_ibdev *dev,static inline struct verbs_txreq *get_txreq (struct hfi1_ibdev *dev,struct rvt_qp *qp) + __must_hold(&qp->slock) {struct verbs_txreq *tx;struct hfi1_qp_priv *priv = qp->priv;
Quoted 8 lines
The patch below does not apply to the 4.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
A 4.6 version is in http://marc.info/?l=linux-rdma&m=146904918032092&w=2.
Oddly it cherry-picked for me ok. Is this due to a flaw in the stable triggering method in the upstream patch?
Mike
[email protected]
maintainerQuoted 10 lines · Mike
Quoted 8 lines
The patch below does not apply to the 4.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
A 4.6 version is in http://marc.info/?l=linux-rdma&m=146904918032092&w=2.
I can't do much with a web-link, can you send me the patch?
Quoted 1 line
Oddly it cherry-picked for me ok. Is this due to a flaw in the stable triggering method in the upstream patch?
Hm, if cherry-pick worked, that's a huge hint, can you send me the cherry-picked patch output? Odds are git can handle a merge issue better than quilt can.
thanks,
greg k-h
Quoted 4 lines
Quoted 2 lines
A 4.6 version is in http://marc.info/?l=linux-rdma&m=146904918032092&w=2.
I can't do much with a web-link, can you send me the patch?
The web link was intended as an FYI.
I submitting the actual patch to [email protected].
Mike
Quoted 4 lines
Subject: RE: FAILED: patch "[PATCH] IB/hfi1: Fix deadlock with txreq allocation slow path" failed to apply to 4.6-stable tree
Quoted 9 lines
Quoted 1 line
Quoted 1 line
A 4.6 version is in http://marc.info/?l=linux-
rdma&m=146904918032092&w=2.
Quoted 2 lines
I can't do much with a web-link, can you send me the patch?
The web link was intended as an FYI.
I submitting the actual patch to [email protected].
Were you able to see this patch on the list?
Mike