IB/rdma_cm: Add wrapper for cma reference count
authorMatan Barak <matanb@mellanox.com>
Wed, 23 Dec 2015 12:56:54 +0000 (14:56 +0200)
committerDoug Ledford <dledford@redhat.com>
Wed, 23 Dec 2015 15:39:52 +0000 (10:39 -0500)
commit218a773f7632d8553638c76d3a5a8c77e82ccea1
treec7caa0a2d13d886219e8bcd34ffdbc6c0fbb02d9
parent200298326b276d8dbeff204f7d407432100d9963
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>
drivers/infiniband/core/cma.c
drivers/infiniband/core/core_priv.h