From: Michael Wang <yun.wang@profitbricks.com>
To: Nicholas Krause <xerofoify@gmail.com>, dledford@redhat.com
Cc: sean.hefty@intel.com, hal.rosenstock@gmail.com,
haggaie@mellanox.com, jgunthorpe@obsidianresearch.com,
matanb@mellanox.com, doront@mellanox.com, david.ahern@oracle.com,
erezsh@mellanox.com, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path
Date: Tue, 15 Dec 2015 17:38:34 +0100 [thread overview]
Message-ID: <5670420A.7040202@profitbricks.com> (raw)
In-Reply-To: <1450194724-7107-1-git-send-email-xerofoify@gmail.com>
On 12/15/2015 04:52 PM, Nicholas Krause wrote:
> This adds a needed error path in the function, cm_init_av_by_path
> after the call to ib_init_ah_from_path in order to avoid incorrectly
> accessing the path pointer of structure type ib_sa_path_rec if this
> function call fails to complete its intended work successfully by
> returning a error code.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> drivers/infiniband/core/cm.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index 0a26dd6..e9b36ea 100644
> --- a/drivers/infiniband/core/cm.c
> +++ b/drivers/infiniband/core/cm.c
> @@ -383,8 +383,11 @@ static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av)
> return ret;
>
> av->port = port;
> - ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
> - &av->ah_attr);
> + ret = ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
> + &av->ah_attr);
..Just wondering what if the transport don't require GRH?
eg inside the same subnet?
The hop_limit is only suggest that the package allowed to be
routed, not have to, correct?
Regards,
Michael Wang
> + if (ret)
> + return ret;
> +
> av->timeout = path->packet_life_time + 1;
>
> return 0;
>
next parent reply other threads:[~2015-12-15 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1450194724-7107-1-git-send-email-xerofoify@gmail.com>
2015-12-15 16:38 ` Michael Wang [this message]
2015-12-15 17:30 ` [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path Jason Gunthorpe
2015-12-16 6:52 ` ira.weiny
2015-12-16 10:26 ` Michael Wang
2015-12-16 18:16 ` Jason Gunthorpe
2015-12-17 8:43 ` Michael Wang
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=5670420A.7040202@profitbricks.com \
--to=yun.wang@profitbricks.com \
--cc=david.ahern@oracle.com \
--cc=dledford@redhat.com \
--cc=doront@mellanox.com \
--cc=erezsh@mellanox.com \
--cc=haggaie@mellanox.com \
--cc=hal.rosenstock@gmail.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matanb@mellanox.com \
--cc=sean.hefty@intel.com \
--cc=xerofoify@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox