[PATCH] Use rsps_lock in nvmet_rdma_free_rsp

Christoph Hellwig hch at infradead.org
Thu Nov 24 23:53:54 PST 2016


On Fri, Nov 25, 2016 at 05:00:26AM +0000, Tomita.Haruo at toshiba-sol.co.jp wrote:
> Hi Christoph,
> 
> Thank you for your reply.
> 
> > what are you trying to protect against during device teardown?
> 
> I'm trying to protect nvmet_rdma_get_rsp and nvmet_rdma_put_rsp.
> In these functions, queue->free_rsps is protected by rsps_lock.
> rsp->free_list is also protected at the same time.

If we can invoke these functions concurrently with nvmet_rdma_free_rsp
we have sever life time rule error.  Under what circumstances do you
see such concurrency?

> I am investigating whether there is a race issue on the target of nvme.
> For another function, I also think of the following patch.

What do you try to protect against with this patch?



More information about the Linux-nvme mailing list