Skip to contentSkip to conversation

Patch "IB/umem: Fix use of npages/nmap fields" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 22, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

IB/umem: Fix use of npages/nmap fields

to the 4.4-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:
ib-umem-fix-use-of-npages-nmap-fields.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Mar 22 14:57:33 CET 2018

From: Artemy Kovalyov <[email protected]>
Date: Tue, 14 Nov 2017 14:51:59 +0200
Subject: IB/umem: Fix use of npages/nmap fields

From: Artemy Kovalyov <[email protected]>

[ Upstream commit edf1a84fe37c51290e2c88154ecaf48dadff3d27 ]

In ib_umem structure npages holds original number of sg entries, while nmap is number of DMA blocks returned by dma_map_sg.

Fixes c5d76f130b28 ('IB/core: Add umem function to read data from user-space')
---
 drivers/infiniband/core/umem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/umem.c +1 -1
@@ -354,7 +354,7 @@ int ib_umem_copy_from(void *dst, struct
 		return -EINVAL;
 	}
 
-	ret = sg_pcopy_to_buffer(umem->sg_head.sgl, umem->nmap, dst, length,
+	ret = sg_pcopy_to_buffer(umem->sg_head.sgl, umem->npages, dst, length,
 				 offset + ib_umem_offset(umem));
 
 	if (ret < 0)

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/ib-umem-fix-use-of-npages-nmap-fields.patch