All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Moshe Lazer <moshel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH RE-RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow
Date: Mon, 16 Feb 2015 22:17:03 +0100	[thread overview]
Message-ID: <1424121423.32606.27.camel@opteya.com> (raw)
In-Reply-To: <1423137232-24587-6-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Le jeudi 05 février 2015 à 13:53 +0200, Or Gerlitz a écrit :
> From: Moshe Lazer <moshel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> The deadlock occurs on __uverbs_modify_qp, we take a lock (idr_read_qp)
> and in case of failure in ib_resolve_eth_l2_attrs we don't release
> it (put_qp_read). Fix that.
> 
> Issue: 355606
 ^^^^^^^^^^^^^^
I'm not sure this is relevant

> Fixes: ed4c54e5b4ba ("IB/core: Resolve Ethernet L2 addresses when modifying QP")
> Signed-off-by: Moshe Lazer <moshel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/infiniband/core/uverbs_cmd.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
> index ecb6430..a602ce9 100644
> --- a/drivers/infiniband/core/uverbs_cmd.c
> +++ b/drivers/infiniband/core/uverbs_cmd.c
> @@ -2097,20 +2097,21 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file,
>  	if (qp->real_qp == qp) {
>  		ret = ib_resolve_eth_l2_attrs(qp, attr, &cmd.attr_mask);
>  		if (ret)
> -			goto out;
> +			goto release_qp;
>  		ret = qp->device->modify_qp(qp, attr,
>  			modify_qp_mask(qp->qp_type, cmd.attr_mask), &udata);
>  	} else {
>  		ret = ib_modify_qp(qp, attr, modify_qp_mask(qp->qp_type, cmd.attr_mask));
>  	}
>  
> -	put_qp_read(qp);
> -
>  	if (ret)
> -		goto out;
> +		goto release_qp;
>  
>  	ret = in_len;
>  
> +release_qp:
> +	put_qp_read(qp);
> +
>  out:
>  	kfree(attr);
>  

Regards.

-- 
Yann Droneaud
OPTEYA


--
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

  parent reply	other threads:[~2015-02-16 21:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 11:53 [PATCH RE-RESEND V2 for-next 0/5] IB core fixes 29-Jan-2015 Or Gerlitz
     [not found] ` <1423137232-24587-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-05 11:53   ` [PATCH RE-RESEND V2 for-next 1/5] IB/core: When marshaling ucma path from user-space, clear unused fields Or Gerlitz
     [not found]     ` <1423137232-24587-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-17 19:24       ` Or Gerlitz
2015-02-05 11:53   ` [PATCH RE-RESEND V2 for-next 2/5] IB/core: Fixes in ib_sa_add_one error flow Or Gerlitz
2015-02-05 11:53   ` [PATCH RE-RESEND V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents Or Gerlitz
     [not found]     ` <1423137232-24587-4-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-16 21:28       ` Yann Droneaud
     [not found]         ` <1424122092.32606.36.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-17 13:59           ` Yann Droneaud
     [not found]             ` <1424181596.32606.43.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-19  9:13               ` Majd Dibbiny
2015-02-05 11:53   ` [PATCH RE-RESEND V2 for-next 4/5] IB/core: Make sure that the PSN does not overflow Or Gerlitz
     [not found]     ` <1423137232-24587-5-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-05 22:27       ` Weiny, Ira
     [not found]         ` <2807E5FD2F6FDA4886F6618EAC48510E0CC1DE52-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-06 15:28           ` Or Gerlitz
2015-02-16 21:22       ` Yann Droneaud
     [not found]         ` <1424121752.32606.32.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-16 22:06           ` Weiny, Ira
2015-02-05 11:53   ` [PATCH RE-RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow Or Gerlitz
     [not found]     ` <1423137232-24587-6-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-16 21:17       ` Yann Droneaud [this message]
2015-02-18  5:03       ` Or Gerlitz
     [not found]         ` <54E41D3E.6020809-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-18  6:07           ` Roland Dreier
     [not found]             ` <CAG4TOxOhnc_ihooLyKJ09P90RMM4MbcWS5McwNOMV4gQ+Ls4Qg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-19  8:31               ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424121423.32606.27.camel@opteya.com \
    --to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
    --cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=moshel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.