All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Li Zhijian <lizhijian@fujitsu.com>
Cc: zyjzyj2000@gmail.com, leon@kernel.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bob Pearson <rpearsonhpe@gmail.com>
Subject: Re: [PATCH for-next v3 1/2] RDMA/rxe: Remove unnecessary mr testing
Date: Mon, 24 Oct 2022 14:16:14 -0300	[thread overview]
Message-ID: <Y1bIXuP6BwA+XxHV@nvidia.com> (raw)
In-Reply-To: <1666582315-2-1-git-send-email-lizhijian@fujitsu.com>

On Mon, Oct 24, 2022 at 03:31:54AM +0000, Li Zhijian wrote:
> Before the testing, we already passed it to rxe_mr_copy() where mr could
> be dereferenced. so this checking is not needed.
> 
> The only way that mr is NULL is when it reaches below line 780 with
>  'qp->resp.mr = NULL', which is not possible in Bob's explanation[1].
> 
>  778         if (res->state == rdatm_res_state_new) {
>  779                 if (!res->replay) {
>  780                         mr = qp->resp.mr;
>  781                         qp->resp.mr = NULL;
>  782                 } else {
> 
> [1] https://lore.kernel.org/lkml/30ff25c4-ce66-eac4-eaa2-64c0db203a19@gmail.com/
> 
> CC: Bob Pearson <rpearsonhpe@gmail.com>
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
> Reviewed-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
> V3: remove WARN_ON # Yanjun and Bob
> ---
>  drivers/infiniband/sw/rxe/rxe_resp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next

Thanks,
Jason

      parent reply	other threads:[~2022-10-24 18:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  3:31 [PATCH for-next v3 1/2] RDMA/rxe: Remove unnecessary mr testing Li Zhijian
2022-10-24  5:20 ` [PATCH for-next v3 2/2] RDMA/rxe: Fix mr leak in RESPST_ERR_RNR Li Zhijian
2022-10-24 11:59   ` Leon Romanovsky
2022-10-24 14:15   ` Bob Pearson
2022-10-24 17:13   ` Jason Gunthorpe
2022-10-25  1:05     ` Li Zhijian
2022-10-24 14:10 ` [PATCH for-next v3 1/2] RDMA/rxe: Remove unnecessary mr testing Bob Pearson
2022-10-24 17:16 ` 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=Y1bIXuP6BwA+XxHV@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --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 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.