]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
IB/mlx5: Fix outstanding_pi index for GSI qps
authorPrabhath Sajeepa <psajeepa@purestorage.com>
Fri, 13 Dec 2019 00:11:29 +0000 (17:11 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commit15c542c0aeacc2e1d66fa16191c4a2090d12a6e6
treed1dcd4669e592c9806a9440f2ddc2d423d1966f5
parentb111c84b625cf79e0b416fe4e01b283df3b7bff0
IB/mlx5: Fix outstanding_pi index for GSI qps

BugLink: https://bugs.launchpad.net/bugs/1866678
commit b5671afe5e39ed71e94eae788bacdcceec69db09 upstream.

Commit b0ffeb537f3a ("IB/mlx5: Fix iteration overrun in GSI qps") changed
the way outstanding WRs are tracked for the GSI QP. But the fix did not
cover the case when a call to ib_post_send() fails and updates index to
track outstanding.

Since the prior commmit outstanding_pi should not be bounded otherwise the
loop generate_completions() will fail.

Fixes: b0ffeb537f3a ("IB/mlx5: Fix iteration overrun in GSI qps")
Link: https://lore.kernel.org/r/1576195889-23527-1-git-send-email-psajeepa@purestorage.com
Signed-off-by: Prabhath Sajeepa <psajeepa@purestorage.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/infiniband/hw/mlx5/gsi.c