Browse Source

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 years ago
parent
commit
a383f8ec55
1 changed files with 1 additions and 0 deletions
  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;