]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nvmet-rdma: register ib_client to not deadlock in device removal
authorSagi Grimberg <sagi@grimberg.me>
Tue, 27 Jun 2017 06:23:33 +0000 (09:23 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Jun 2017 14:14:13 +0000 (08:14 -0600)
commitf1d4ef7d88832444e8dfeb0e85e19d3b6ecb5011
treea3ed6b5fa17b0677b334518abff4e303e2c23225
parent69fa964632fe18a11a80ead0d09ef3399b08144a
nvmet-rdma: register ib_client to not deadlock in device removal

We can deadlock in case we got to a device removal
event on a queue which is already in the process of
destroying the cm_id is this is blocking until all
events on this cm_id will drain. On the other hand
we cannot guarantee that rdma_destroy_id was invoked
as we only have indication that the queue disconnect
flow has been queued (the queue state is updated before
the realease work has been queued).

So, we leave all the queue removal to a separate ib_client
to avoid this deadlock as ib_client device removal is in
a different context than the cm_id itself.

Reported-by: Shiraz Saleem <shiraz.saleem@intel.com>
Tested-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/rdma.c