aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types_cq.c
diff options
context:
space:
mode:
authorGal Pressman <galpress@amazon.com>2019-05-22 11:06:43 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-05-27 14:36:36 -0300
commit6876aaedc8a11ed182aba1942dac44e9940bfe6c (patch)
tree7f7421452bf19273091485a2930bbda079232924 /drivers/infiniband/core/uverbs_std_types_cq.c
parentRDMA/core: Clear out the udata before error unwind (diff)
downloadlinux-dev-6876aaedc8a11ed182aba1942dac44e9940bfe6c.tar.xz
linux-dev-6876aaedc8a11ed182aba1942dac44e9940bfe6c.zip
RDMA/uverbs: Pass udata on uverbs error unwind
When destroy_* is called as a result of uverbs create cleanup flow a cleared udata should be passed instead of NULL to indicate that it is called under user flow. Fixes: c4367a26357b ("IB: Pass uverbs_attr_bundle down ib_x destroy path") Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_cq.c')
-rw-r--r--drivers/infiniband/core/uverbs_std_types_cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types_cq.c b/drivers/infiniband/core/uverbs_std_types_cq.c
index db5c46a1bb2d..07ea4e3c4566 100644
--- a/drivers/infiniband/core/uverbs_std_types_cq.c
+++ b/drivers/infiniband/core/uverbs_std_types_cq.c
@@ -135,7 +135,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)(
return 0;
err_cq:
- ib_destroy_cq(cq);
+ ib_destroy_cq_user(cq, uverbs_get_cleared_udata(attrs));
err_event_file:
if (ev_file)