When mapping CQ/RQ/SQ check the mmap return value. Signed-off-by: Ram Amrani <Ram.Amrani@xxxxxxxxxx> Signed-off-by: Ariel Elior <Ariel.Elior@xxxxxxxxxx> --- providers/qedr/qelr_chain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/qedr/qelr_chain.c b/providers/qedr/qelr_chain.c index edc72f4..d9ccc0b 100644 --- a/providers/qedr/qelr_chain.c +++ b/providers/qedr/qelr_chain.c @@ -76,7 +76,7 @@ int qelr_chain_alloc(struct qelr_chain *chain, int chain_size, int page_size, addr = mmap(NULL, a_chain_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, QELR_ANON_FD, QELR_ANON_OFFSET); - if (chain->first_addr == MAP_FAILED) + if (addr == MAP_FAILED) return errno; ret = ibv_dontfork_range(addr, a_chain_size); -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html