Skip to content

Commit 11d9c91

Browse files
committed
linux/efa: GDR, Pass correct start address on error flow
On error flow, we're calling put_pages() with the user's start address instead of the page-aligned address. Fix this. Reviewed-by: Yossi Leybovich <[email protected]> Signed-off-by: Firas Jahjah <[email protected]>
1 parent 98c32ce commit 11d9c91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/linux/efa/src/efa_gdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ struct efa_nvmem *nvmem_get(struct efa_dev *dev, struct efa_mr *mr, u64 start,
245245
err_unmap:
246246
nvmem->ops.dma_unmap_pages(dev->pdev, nvmem->pgtbl, nvmem->dma_mapping);
247247
err_put:
248-
nvmem->ops.put_pages(0, 0, start, nvmem->pgtbl);
248+
nvmem->ops.put_pages(0, 0, virt_start, nvmem->pgtbl);
249249
err_put_fp:
250250
nvmem_put_fp();
251251
err_free:

0 commit comments

Comments
 (0)