Skip to content

Commit

Permalink
linux/efa: GDR, Pass correct start address on error flow
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
firasj committed Oct 17, 2021
1 parent 98c32ce commit 11d9c91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/linux/efa/src/efa_gdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ struct efa_nvmem *nvmem_get(struct efa_dev *dev, struct efa_mr *mr, u64 start,
err_unmap:
nvmem->ops.dma_unmap_pages(dev->pdev, nvmem->pgtbl, nvmem->dma_mapping);
err_put:
nvmem->ops.put_pages(0, 0, start, nvmem->pgtbl);
nvmem->ops.put_pages(0, 0, virt_start, nvmem->pgtbl);
err_put_fp:
nvmem_put_fp();
err_free:
Expand Down

0 comments on commit 11d9c91

Please sign in to comment.