Patch "RDMA/umem: Use ib_dma_max_seg_size instead of dma_get_max_seg_size" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RDMA/umem: Use ib_dma_max_seg_size instead of dma_get_max_seg_size

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-umem-use-ib_dma_max_seg_size-instead-of-dma_get_max_seg_size.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From b116c702791a9834e6485f67ca6267d9fdf59b87 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@xxxxxx>
Date: Fri, 6 Nov 2020 19:19:33 +0100
Subject: RDMA/umem: Use ib_dma_max_seg_size instead of dma_get_max_seg_size

From: Christoph Hellwig <hch@xxxxxx>

commit b116c702791a9834e6485f67ca6267d9fdf59b87 upstream.

RDMA ULPs must not call DMA mapping APIs directly but instead use the
ib_dma_* wrappers.

Fixes: 0c16d9635e3a ("RDMA/umem: Move to allocate SG table from pages")
Link: https://lore.kernel.org/r/20201106181941.1878556-3-hch@xxxxxx
Reported-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Cc: "Marciniszyn, Mike" <mike.marciniszyn@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/infiniband/core/umem.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -220,10 +220,10 @@ struct ib_umem *ib_umem_get(struct ib_de
 
 		cur_base += ret * PAGE_SIZE;
 		npages -= ret;
-		sg = __sg_alloc_table_from_pages(
-			&umem->sg_head, page_list, ret, 0, ret << PAGE_SHIFT,
-			dma_get_max_seg_size(device->dma_device), sg, npages,
-			GFP_KERNEL);
+		sg = __sg_alloc_table_from_pages(&umem->sg_head, page_list, ret,
+				0, ret << PAGE_SHIFT,
+				ib_dma_max_seg_size(device), sg, npages,
+				GFP_KERNEL);
 		umem->sg_nents = umem->sg_head.nents;
 		if (IS_ERR(sg)) {
 			unpin_user_pages_dirty_lock(page_list, ret, 0);


Patches currently in stable-queue which might be from hch@xxxxxx are

queue-5.10/nvme-fc-fix-racing-controller-reset-and-create-assoc.patch
queue-5.10/drm-use-usb-controller-s-dma-mask-when-importing-dmabufs.patch
queue-5.10/mount-fix-mounting-of-detached-mounts-onto-targets-that-reside-on-shared-mounts.patch
queue-5.10/block-try-to-handle-busy-underlying-device-on-discard.patch
queue-5.10/rdma-umem-use-ib_dma_max_seg_size-instead-of-dma_get_max_seg_size.patch
queue-5.10/configfs-fix-a-use-after-free-in-__configfs_open_fil.patch
queue-5.10/block-discard-page-cache-of-zone-reset-target-range.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux