Message ID | 1550760588-204074-6-git-send-email-oulijun@huawei.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Misc updates for libhns | expand |
diff --git a/providers/hns/hns_roce_u_buf.c b/providers/hns/hns_roce_u_buf.c index f92ea65..27ed90c 100644 --- a/providers/hns/hns_roce_u_buf.c +++ b/providers/hns/hns_roce_u_buf.c @@ -46,7 +46,7 @@ int hns_roce_alloc_buf(struct hns_roce_buf *buf, unsigned int size, if (buf->buf == MAP_FAILED) return errno; - ret = ibv_dontfork_range(buf->buf, size); + ret = ibv_dontfork_range(buf->buf, buf->length); if (ret) munmap(buf->buf, buf->length);
We should use the length of buffer after aligned according the input size for ibv_dontfork_range function. Fixes: c24583975044 ("libhns: Add verbs of qp support") Signed-off-by: Lijun Ou <oulijun@huawei.com> --- providers/hns/hns_roce_u_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)