RDMA/cm: Allow ib_send_cm_dreq() to be done under lock
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 10 Mar 2020 09:25:41 +0000 (11:25 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 17 Mar 2020 20:05:53 +0000 (17:05 -0300)
commite029fdc0684785ffdeca758a08bd860bae8c344d
treee0df834048d339d62fef9df0d774d4b0357a1f6f
parent00777a68ae98931d2d10f0aa8bfa60734cc09bfd
RDMA/cm: Allow ib_send_cm_dreq() to be done under lock

The first thing ib_send_cm_dreq() does is obtain the lock, so use the
usual unlocked wrapper, locked actor pattern here.

This avoids a sketchy lock/unlock sequence (which could allow state to
change) during cm_destroy_id().

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