From: Jason Gunthorpe <jgg@nvidia.com>
To: Weihang Li <liweihang@huawei.com>
Cc: <dledford@redhat.com>, <leon@kernel.org>,
<linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH for-rc] RDMA/core: Fix unsafe linked list traversal after failing to allocate CQ
Date: Wed, 2 Sep 2020 17:03:13 -0300 [thread overview]
Message-ID: <20200902200313.GA1456344@nvidia.com> (raw)
In-Reply-To: <1598963935-32335-1-git-send-email-liweihang@huawei.com>
On Tue, Sep 01, 2020 at 08:38:55PM +0800, Weihang Li wrote:
> From: Xi Wang <wangxi11@huawei.com>
>
> It's not safe to access the next CQ in list_for_each_entry() after invoking
> ib_free_cq(), because the CQ has already been freed in current iteration.
> It should be replaced by list_for_each_entry_safe().
>
> Fixes: c7ff819aefea ("RDMA/core: Introduce shared CQ pool API")
> Signed-off-by: Xi Wang <wangxi11@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
> drivers/infiniband/core/cq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to for-rc, thanks
Jason
prev parent reply other threads:[~2020-09-02 20:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 12:38 [PATCH for-rc] RDMA/core: Fix unsafe linked list traversal after failing to allocate CQ Weihang Li
2020-09-02 20:03 ` Jason Gunthorpe [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=20200902200313.GA1456344@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liweihang@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).