summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/core_priv.h
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-12-23 12:56:54 (GMT)
committerDoug Ledford <dledford@redhat.com>2015-12-23 15:39:52 (GMT)
commit218a773f7632d8553638c76d3a5a8c77e82ccea1 (patch)
treec7caa0a2d13d886219e8bcd34ffdbc6c0fbb02d9 /drivers/infiniband/core/core_priv.h
parent200298326b276d8dbeff204f7d407432100d9963 (diff)
downloadlinux-218a773f7632d8553638c76d3a5a8c77e82ccea1.tar.xz
IB/rdma_cm: Add wrapper for cma reference count
Currently, cma users can't increase or decrease the cma reference count. This is necassary when setting cma attributes (like the default GID type) in order to avoid use-after-free errors. Adding cma_ref_dev and cma_deref_dev APIs. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/core_priv.h')
-rw-r--r--drivers/infiniband/core/core_priv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
index 3b250a2..1945b4e 100644
--- a/drivers/infiniband/core/core_priv.h
+++ b/drivers/infiniband/core/core_priv.h
@@ -38,6 +38,10 @@
#include <rdma/ib_verbs.h>
+struct cma_device;
+void cma_ref_dev(struct cma_device *cma_dev);
+void cma_deref_dev(struct cma_device *cma_dev);
+
int ib_device_register_sysfs(struct ib_device *device,
int (*port_callback)(struct ib_device *,
u8, struct kobject *));