]> git.itanic.dy.fi Git - linux-stable/commit
RDMA/bnxt_re: Remove the qp from list only if the qp destroy succeeds
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 24 Aug 2020 18:14:31 +0000 (11:14 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 27 Aug 2020 12:30:44 +0000 (09:30 -0300)
commit097a9d23b7250355b182c5fd47dd4c55b22b1c33
tree8706b5f36d24495d2cb44c6b8ea9a3175ce56a77
parent934d0ac9a64d21523e3ad03ea4098da7826bc788
RDMA/bnxt_re: Remove the qp from list only if the qp destroy succeeds

Driver crashes when destroy_qp is re-tried because of an error
returned. This is because the qp entry was removed from the qp list during
the first call.

Remove qp from the list only if destroy_qp returns success.

The driver will still trigger a WARN_ON due to the memory leaking, but at
least it isn't corrupting memory too.

Fixes: 8dae419f9ec7 ("RDMA/bnxt_re: Refactor queue pair creation code")
Link: https://lore.kernel.org/r/1598292876-26529-2-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c