RDMA/cm: Increment the refcount inside cm_find_listen()
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 6 May 2020 07:47:01 +0000 (10:47 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 13 May 2020 00:32:54 +0000 (21:32 -0300)
commita0e46db4e764f56c61f85c235c50bf4578c51a47
tree6b28a3e96dd4bbac2e4cc1f0c6a8bd1be80e0dce
parent51e8463cfc48ca030e532c9127ee1219a95795c3
RDMA/cm: Increment the refcount inside cm_find_listen()

All callers need the 'get', so do it in a central place before returning
the pointer.

Link: https://lore.kernel.org/r/20200506074701.9775-11-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cm.c