public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] iw_cxgb4: always wake up waiters in c4iw_peer_abort_intr().
@ 2012-04-27 14:59 Steve Wise
       [not found] ` <20120427145915.27184.35216.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2012-04-27 14:59 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, sbest-H+wXaHxf7aLQT0dZR+AlfA

This fixes a race where an ingress abort fails to wake up the
thread blocked in rdma_init() causing the app to hang.

Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---

 drivers/infiniband/hw/cxgb4/cm.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 92b4c2b..8f43143 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2667,11 +2667,8 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
 
 	/*
 	 * Wake up any threads in rdma_init() or rdma_fini().
-	 * However, this is not needed if com state is just
-	 * MPA_REQ_SENT
 	 */
-	if (ep->com.state != MPA_REQ_SENT)
-		c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
+	c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
 	sched(dev, skb);
 	return 0;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found.
       [not found] ` <20120427145915.27184.35216.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
@ 2012-04-27 14:59   ` Steve Wise
       [not found]     ` <20120427145922.27184.74574.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2012-04-27 14:59 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, sbest-H+wXaHxf7aLQT0dZR+AlfA

Just log a warning.

Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---

 drivers/infiniband/hw/cxgb4/cm.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 8f43143..3d0e40a 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1362,7 +1362,10 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
 
 	ep = lookup_tid(t, tid);
 	PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
-	BUG_ON(!ep);
+	if (!ep) {
+		printk(KERN_WARNING MOD "Abort rpl to freed endpoint\n");
+		return 0;
+	}
 	mutex_lock(&ep->com.mutex);
 	switch (ep->com.state) {
 	case ABORTING:

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found.
       [not found]     ` <20120427145922.27184.74574.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
@ 2012-04-30 19:33       ` Steve Wise
       [not found]         ` <4F9EE916.9010708-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2012-04-30 19:33 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, sbest-H+wXaHxf7aLQT0dZR+AlfA

Hey Roland, this patch is incorrect.  It erroneously changes abort_rpl() 
instead of peer_abort_intr().  I will resubmit the correct patch asap.


On 04/27/2012 09:59 AM, Steve Wise wrote:
> Just log a warning.
>
> Signed-off-by: Steve Wise<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>
>   drivers/infiniband/hw/cxgb4/cm.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
> index 8f43143..3d0e40a 100644
> --- a/drivers/infiniband/hw/cxgb4/cm.c
> +++ b/drivers/infiniband/hw/cxgb4/cm.c
> @@ -1362,7 +1362,10 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
>
>   	ep = lookup_tid(t, tid);
>   	PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
> -	BUG_ON(!ep);
> +	if (!ep) {
> +		printk(KERN_WARNING MOD "Abort rpl to freed endpoint\n");
> +		return 0;
> +	}
>   	mutex_lock(&ep->com.mutex);
>   	switch (ep->com.state) {
>   	case ABORTING:
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found.
       [not found]         ` <4F9EE916.9010708-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
@ 2012-04-30 20:22           ` Roland Dreier
  0 siblings, 0 replies; 4+ messages in thread
From: Roland Dreier @ 2012-04-30 20:22 UTC (permalink / raw)
  To: Steve Wise
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, sbest-H+wXaHxf7aLQT0dZR+AlfA

On Mon, Apr 30, 2012 at 12:33 PM, Steve Wise
<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> wrote:
> Hey Roland, this patch is incorrect.  It erroneously changes abort_rpl()
> instead of peer_abort_intr().  I will resubmit the correct patch asap.

OK, consider it dropped.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-30 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 14:59 [PATCH 1/2] iw_cxgb4: always wake up waiters in c4iw_peer_abort_intr() Steve Wise
     [not found] ` <20120427145915.27184.35216.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2012-04-27 14:59   ` [PATCH 2/2] iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found Steve Wise
     [not found]     ` <20120427145922.27184.74574.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2012-04-30 19:33       ` Steve Wise
     [not found]         ` <4F9EE916.9010708-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2012-04-30 20:22           ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox