From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH RE-RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow
Date: Wed, 18 Feb 2015 00:03:58 -0500 [thread overview]
Message-ID: <54E41D3E.6020809@mellanox.com> (raw)
In-Reply-To: <1423137232-24587-6-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On 2/5/2015 6:53 AM, Or Gerlitz wrote:
> 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
> 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>
Roland, can you please pick this one too, it's a bug fix and no comments
were raised against it.
I just failed to remove the Gerrit Issue: XXX line, so if you can do
that, will be great
> ---
> 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);
>
--
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
next prev parent reply other threads:[~2015-02-18 5:03 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
2015-02-18 5:03 ` Or Gerlitz [this message]
[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=54E41D3E.6020809@mellanox.com \
--to=ogerlitz-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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.