]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: fix unmap_sg argument
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Fri, 2 Dec 2016 13:45:26 +0000 (14:45 +0100)
committerDoug Ledford <dledford@redhat.com>
Wed, 14 Dec 2016 19:21:26 +0000 (14:21 -0500)
commitec5b1af17275053f868dc25d69c022c11fbda4aa
treef3ba33f25fce3d6f3aae7900ba29bc277a15a68c
parent0f6c18e92a55112eb4aa27e614f69e71f4cc34f6
IB/core: fix unmap_sg argument

__ib_umem_release calls dma_unmap_sg with a different number of
sg_entries than ib_umem_get uses for dma_map_sg. This might cause
trouble for implementations that merge sglist entries and results
in the following dma debug complaint:

DMA-API: device driver frees DMA sg list with different entry
         count [map count=2] [unmap count=1]

Fix it by using the correct value.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/umem.c