summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDean Luick <dean.luick@intel.com>2016-07-28 15:21:16 -0400
committerDoug Ledford <dledford@redhat.com>2016-08-02 22:46:21 -0400
commita383f8ec552c9af5066eb488cc7a2d8b3994151d (patch)
tree13c4cf39c3c2fc6e20f770b485061ea17f050ee7 /drivers/infiniband
parent9ff73c8715dbd02d18b4d99c815f388413314229 (diff)
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hfi1/user_sdma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c
index 42cc371cdf95..ff03e1dad5b9 100644
--- a/drivers/infiniband/hw/hfi1/user_sdma.c
+++ b/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;