From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next v2] RDMA/rxe: Fix resize_finish() in rxe_queue.c
Date: Mon, 26 Sep 2022 14:40:58 -0300 [thread overview]
Message-ID: <YzHkKl3ejOcJGbD2@nvidia.com> (raw)
In-Reply-To: <20220825221446.6512-1-rpearsonhpe@gmail.com>
On Thu, Aug 25, 2022 at 05:14:47PM -0500, Bob Pearson wrote:
> Currently in resize_finish() in rxe_queue.c there is a loop which
> copies the entries in the original queue into a newly allocated queue.
> The termination logic for this loop is incorrect. The call to
> queue_next_index() updates cons but has no effect on whether the
> queue is empty. So if the queue starts out empty nothing is copied
> but if it is not then the loop will run forever. This patch changes
> the loop to compare the value of cons to the original producer index.
>
> Fixes: ae6e843fe08d0 ("RDMA/rxe: Add memory barriers to kernel queues")
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
> ---
> v2
> Fixed typo. Should have replaced all original 'prod' by 'new_prod'
> ---
> drivers/infiniband/sw/rxe/rxe_queue.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
Applied to for-next, thanks
Jason
prev parent reply other threads:[~2022-09-26 18:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 22:14 [PATCH for-next v2] RDMA/rxe: Fix resize_finish() in rxe_queue.c Bob Pearson
2022-08-31 8:26 ` Li Zhijian
2022-09-26 17:40 ` 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=YzHkKl3ejOcJGbD2@nvidia.com \
--to=jgg@nvidia.com \
--cc=jhack@hpe.com \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@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;
as well as URLs for NNTP newsgroup(s).