Skip to contentSkip to conversation

Patch "mlx5: Fix mlx5_ib_map_mr_sg mr length" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message May 22, 2017

Subsystems (3)
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

mlx5: Fix mlx5_ib_map_mr_sg mr length

to the 4.11-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:

     mlx5-fix-mlx5_ib_map_mr_sg-mr-length.patch

and it can be found in the queue-4.11 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 0a49f2c31c3efbeb0de3e4b5598764887f629be2 Mon Sep 17 00:00:00 2001

From: Sagi Grimberg <[email protected]>
Date: Sun, 23 Apr 2017 14:31:42 +0300
Subject: mlx5: Fix mlx5_ib_map_mr_sg mr length

From: Sagi Grimberg <[email protected]>

commit 0a49f2c31c3efbeb0de3e4b5598764887f629be2 upstream.

In case we got an initial sg_offset, we need to
account for it in the mr length.

Fixes ff2ba9936591 ("IB/core: Add passing an offset into the SG to ib_map_mr_sg")
---
 drivers/infiniband/hw/mlx5/mr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mr.c +1 -1
@@ -1782,7 +1782,7 @@ mlx5_ib_sg_to_klms(struct mlx5_ib_mr *mr
 		klms[i].va = cpu_to_be64(sg_dma_address(sg) + sg_offset);
 		klms[i].bcount = cpu_to_be32(sg_dma_len(sg) - sg_offset);
 		klms[i].key = cpu_to_be32(lkey);
-		mr->ibmr.length += sg_dma_len(sg);
+		mr->ibmr.length += sg_dma_len(sg) - sg_offset;
 
 		sg_offset = 0;
 	}

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

queue-4.11/mlx5-fix-mlx5_ib_map_mr_sg-mr-length.patch