IB/uverbs: Fix leak of XRC target QPs
authorTariq Toukan <tariqt@mellanox.com>
Thu, 27 Oct 2016 13:36:26 +0000 (16:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2016 08:54:54 +0000 (09:54 +0100)
commit2b026a265a9ad0475045e9204ed832932c6af0d2
treebceb5592c41244f43ed0eaf3a30d38eb9a687c06
parenteba83a85cabaaee02b25edfa19f85c4de73a5165
IB/uverbs: Fix leak of XRC target QPs

commit 5b810a242c28e1d8d64d718cebe75b79d86a0b2d upstream.

The real QP is destroyed in case of the ref count reaches zero, but
for XRC target QPs this call was missed and caused to QP leaks.

Let's call to destroy for all flows.

Fixes: 0e0ec7e0638e ('RDMA/core: Export ib_open_qp() to share XRC...')
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/uverbs_main.c