lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 15 Dec 2019 20:55:00 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Prabhath Sajeepa <psajeepa@...estorage.com>
Cc:     dledford@...hat.com, jgg@...pe.ca, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, roland@...estorage.com
Subject: Re: [PATCH] IB/mlx5: Fix outstanding_pi index for GSI qps

On Thu, Dec 12, 2019 at 05:11:29PM -0700, Prabhath Sajeepa wrote:
> b0ffeb537f3a changed the way how outstanding WRs are tracked for GSI QP. But the
> fix did not cover the case when a call to ib_post_send fails and index
> to track outstanding WRs need to be updated correctly.
>
> Fixes: b0ffeb537f3a ('IB/mlx5: Fix iteration overrun in GSI qps ')
> Signed-off-by: Prabhath Sajeepa <psajeepa@...estorage.com>
> ---
>  drivers/infiniband/hw/mlx5/gsi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/gsi.c b/drivers/infiniband/hw/mlx5/gsi.c
> index ac4d8d1..1ae6fd9 100644
> --- a/drivers/infiniband/hw/mlx5/gsi.c
> +++ b/drivers/infiniband/hw/mlx5/gsi.c
> @@ -507,8 +507,7 @@ int mlx5_ib_gsi_post_send(struct ib_qp *qp, const struct ib_send_wr *wr,
>  		ret = ib_post_send(tx_qp, &cur_wr.wr, bad_wr);
>  		if (ret) {
>  			/* Undo the effect of adding the outstanding wr */
> -			gsi->outstanding_pi = (gsi->outstanding_pi - 1) %
> -					      gsi->cap.max_send_wr;
> +			gsi->outstanding_pi--;

I'm a little bit confused, what is the difference before and after
except dropping "gsi->cap.max_send_wr"?

Thanks

>  			goto err;
>  		}
>  		spin_unlock_irqrestore(&gsi->lock, flags);
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ