瀏覽代碼

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: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Dean Luick 9 年之前
父節點
當前提交
a383f8ec55
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/infiniband/hw/hfi1/user_sdma.c

+ 1 - 0
drivers/infiniband/hw/hfi1/user_sdma.c

@@ -1239,6 +1239,7 @@ retry:
 			list_del(&node->list);
 		pq->n_locked -= node->npages;
 		spin_unlock(&pq->evict_lock);
+		iovec->node = NULL;
 		goto bail;
 	}
 	return 0;