WSL2-Linux-Kernel/drivers/infiniband
Jason Gunthorpe b16de8b9e7 RDMA: Handle the return code from dma_resv_wait_timeout() properly
ib_umem_dmabuf_map_pages() returns 0 on success and -ERRNO on failure.

dma_resv_wait_timeout() uses a different scheme:

 * Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or
 * greater than zero on success.

This results in ib_umem_dmabuf_map_pages() being non-functional as a
positive return will be understood to be an error by drivers.

Fixes: f30bceab16 ("RDMA: use dma_resv_wait() instead of extracting the fence")
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/0-v1-d8f4e1fa84c8+17-rdma_dmabuf_fix_jgg@nvidia.com
Tested-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2022-08-16 17:13:23 +03:00
..
core RDMA: Handle the return code from dma_resv_wait_timeout() properly 2022-08-16 17:13:23 +03:00
hw RDMA/erdma: Correct the max_qp and max_cq capacities of the device 2022-08-16 16:29:12 +03:00
sw RDMA/rxe: Fix error unwind in rxe_create_qp() 2022-08-02 14:29:41 -03:00
ulp IB/iser: Fix login with authentication 2022-08-16 15:56:33 +03:00
Kconfig RDMA/erdma: Add driver to kernel build environment 2022-07-27 16:04:05 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00