From: Doug Ledford <dledford@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Lijun Ou <oulijun@huawei.com>, Wei Hu <xavier.huwei@huawei.com>
Cc: Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] RDMA/hns: Fix uninitialized variable in hns_roce_v2_query_qp()
Date: Wed, 04 Oct 2017 19:15:41 +0000 [thread overview]
Message-ID: <1507144541.46071.2.camel@redhat.com> (raw)
In-Reply-To: <20171003105418.jpthrfu7j7ojk5fg@mwanda>
On Tue, 2017-10-03 at 13:54 +0300, Dan Carpenter wrote:
> We accidentally return an uninitialized value if
> (hr_qp->state = IB_QPS_RESET). We should be returning success.
>
> Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08
> SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Hi Dan, I already took in another patch that solves the same issue.
Thanks.
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> index 4171f73bdad5..e1c59dc066c9 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> @@ -2792,7 +2792,7 @@ static int hns_roce_v2_query_qp(struct ib_qp
> *ibqp, struct ib_qp_attr *qp_attr,
> struct device *dev = hr_dev->dev;
> int tmp_qp_state;
> int state;
> - int ret;
> + int ret = 0;
>
> context = kzalloc(sizeof(*context), GFP_KERNEL);
> if (!context)
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
prev parent reply other threads:[~2017-10-04 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 10:54 [PATCH] RDMA/hns: Fix uninitialized variable in hns_roce_v2_query_qp() Dan Carpenter
2017-10-04 19:15 ` Doug Ledford [this message]
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=1507144541.46071.2.camel@redhat.com \
--to=dledford@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=hal.rosenstock@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=oulijun@huawei.com \
--cc=sean.hefty@intel.com \
--cc=xavier.huwei@huawei.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;
as well as URLs for NNTP newsgroup(s).