Message ID | 565EBA78.3050201@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 043a60e..23457fe 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1544,7 +1544,7 @@ int ib_sg_to_pages(struct ib_mr *mr, u64 end_dma_addr = dma_addr + dma_len; u64 page_addr = dma_addr & page_mask; - if (i && page_addr != dma_addr) { + if (i && (page_addr != dma_addr || last_page_off)) { if (last_end_dma_addr != dma_addr) { /* gap */ goto done;