提交 a383f8ec 编写于 作者: D Dean Luick 提交者: Doug Ledford

IB/hfi1: Release node on insert failure

If unable to insert node into the RB tree cache, node will be freed
before returning from the function.  Null out iovec's pointer to node
so iovec does not try to free it later.
Reviewed-by: NIra Weiny <ira.weiny@intel.com>
Signed-off-by: NDean Luick <dean.luick@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 9ff73c87
......@@ -1239,6 +1239,7 @@ static int pin_vector_pages(struct user_sdma_request *req,
list_del(&node->list);
pq->n_locked -= node->npages;
spin_unlock(&pq->evict_lock);
iovec->node = NULL;
goto bail;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册