]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/rw: Fix error flow during RDMA context initialization
authorMax Gurtovoy <maxg@mellanox.com>
Thu, 20 Feb 2020 10:08:18 +0000 (12:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:43 +0000 (07:18 +0100)
commit0f72324e796fe6baa6da659dd09089d45e4adb09
tree499a903537d6d525868fe0112e369e5c64d8c09d
parent4d31492879db6f7280b80ee7f7553a47b59ebea0
RDMA/rw: Fix error flow during RDMA context initialization

commit 6affca140cbea01f497c4f4e16f1e2be7f74bd04 upstream.

In case the SGL was mapped for P2P DMA operation, we must unmap it using
pci_p2pdma_unmap_sg during the error unwind of rdma_rw_ctx_init()

Fixes: 7f73eac3a713 ("PCI/P2PDMA: Introduce pci_p2pdma_unmap_sg()")
Link: https://lore.kernel.org/r/20200220100819.41860-1-maxg@mellanox.com
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/rw.c