diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2021-10-13 19:59:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-18 21:16:52 +0300 |
commit | 88d564772486c9eae236667485e7db8190e8759a (patch) | |
tree | 46e8aa955821138a7b95fa208c9453f3d6a72c94 /lib/dynamic_debug.c | |
parent | cc7f21385c83dea09ddd00c7377aacdf60bf9a27 (diff) | |
download | linux-88d564772486c9eae236667485e7db8190e8759a.tar.xz |
RDMA/core: Set sgtable nents when using ib_dma_virt_map_sg()
[ Upstream commit ac0fffa0859b8e1e991939663b3ebdd80bf979e6 ]
ib_dma_map_sgtable_attrs() should be mapping the sgls and setting nents
but the ib_uses_virt_dma() path falls back to ib_dma_virt_map_sg() which
will not set the nents in the sgtable.
Check the return value (per the map_sg calling convention) and set
sgt->nents appropriately on success.
Fixes: 79fbd3e1241c ("RDMA: Use the sg_table directly and remove the opencoded version from umem")
Link: https://lore.kernel.org/r/20211013165942.89806-1-logang@deltatee.com
Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions