aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index a57d021d435a..6985a57fa6ae 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -489,6 +489,7 @@ err_idr:
489 489
490err_unreg: 490err_unreg:
491 ib_dereg_mr(mr); 491 ib_dereg_mr(mr);
492 atomic_dec(&pd->usecnt);
492 493
493err_up: 494err_up:
494 up(&ib_uverbs_idr_mutex); 495 up(&ib_uverbs_idr_mutex);
@@ -935,6 +936,11 @@ err_idr:
935 936
936err_destroy: 937err_destroy:
937 ib_destroy_qp(qp); 938 ib_destroy_qp(qp);
939 atomic_dec(&pd->usecnt);
940 atomic_dec(&attr.send_cq->usecnt);
941 atomic_dec(&attr.recv_cq->usecnt);
942 if (attr.srq)
943 atomic_dec(&attr.srq->usecnt);
938 944
939err_up: 945err_up:
940 up(&ib_uverbs_idr_mutex); 946 up(&ib_uverbs_idr_mutex);
@@ -1729,6 +1735,7 @@ err_idr:
1729 1735
1730err_destroy: 1736err_destroy:
1731 ib_destroy_srq(srq); 1737 ib_destroy_srq(srq);
1738 atomic_dec(&pd->usecnt);
1732 1739
1733err_up: 1740err_up:
1734 up(&ib_uverbs_idr_mutex); 1741 up(&ib_uverbs_idr_mutex);